Files
BrightSharp.Toolkit/JetFrames.AppleJobs.Editor/Views/Models.xaml

23 lines
1.5 KiB
Plaintext
Raw Normal View History

2017-01-09 13:25:52 +03:00
<UserControl x:Class="JetFrames.AppleJobs.Editor.Views.Models"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:JetFrames.AppleJobs.Editor.Views"
mc:Ignorable="d" d:DataContext="{StaticResource ViewModelLocator}"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
2017-01-10 21:06:47 +03:00
<DataGrid x:Name="dg" ItemsSource="{Binding Editor.Models}"
AlternatingRowBackground="{DynamicResource AlternatingRowBackgroundBrush}">
2017-01-09 13:25:52 +03:00
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Name}" Header="Модель" Width="120" />
<DataGridComboBoxColumn SelectedValueBinding="{Binding ModelCategory, ValidatesOnExceptions=True}"
2017-01-10 21:06:47 +03:00
ClipboardContentBinding="{Binding ModelCategory.Name}"
ItemsSource="{Binding Source={StaticResource ViewModelLocator}, Path=Editor.Categories}"
DisplayMemberPath="Name" Header="Категория" Width="120" SortMemberPath="ModelCategory.Name"
EditingElementStyle="{StaticResource {x:Type ComboBox}}" />
2017-01-09 13:25:52 +03:00
</DataGrid.Columns>
</DataGrid>
</Grid>
</UserControl>