100 lines
5.0 KiB
XML
100 lines
5.0 KiB
XML
<Window x:Class="XLAB2.TpvdklWindow"
|
||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
Title="Виды клейм"
|
||
Height="420"
|
||
Width="720"
|
||
MinHeight="380"
|
||
MinWidth="660"
|
||
Loaded="Window_Loaded"
|
||
WindowStartupLocation="CenterOwner">
|
||
<Grid Margin="12">
|
||
<Grid.RowDefinitions>
|
||
<RowDefinition Height="Auto" />
|
||
<RowDefinition Height="*" />
|
||
<RowDefinition Height="Auto" />
|
||
</Grid.RowDefinitions>
|
||
|
||
<TextBlock Grid.Row="0"
|
||
Margin="0,0,0,8"
|
||
FontWeight="SemiBold"
|
||
Text="{Binding Caption}" />
|
||
|
||
<DataGrid Grid.Row="1"
|
||
ItemsSource="{Binding Items}"
|
||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||
AutoGenerateColumns="False"
|
||
CanUserAddRows="False"
|
||
IsReadOnly="True"
|
||
HeadersVisibility="Column">
|
||
<DataGrid.ContextMenu>
|
||
<ContextMenu DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
|
||
<MenuItem Header="Добавить"
|
||
Command="{Binding AddCommand}">
|
||
<MenuItem.Icon>
|
||
<Viewbox Width="14" Height="14">
|
||
<Grid Width="16" Height="16">
|
||
<Ellipse Width="14" Height="14" Fill="{StaticResource AppMenuIconAccentBrush}" />
|
||
<Rectangle Width="2" Height="8" Fill="White" RadiusX="1" RadiusY="1" />
|
||
<Rectangle Width="8" Height="2" Fill="White" RadiusX="1" RadiusY="1" />
|
||
</Grid>
|
||
</Viewbox>
|
||
</MenuItem.Icon>
|
||
</MenuItem>
|
||
<MenuItem Header="Изменить"
|
||
Command="{Binding EditCommand}">
|
||
<MenuItem.Icon>
|
||
<Viewbox Width="14" Height="14">
|
||
<Canvas Width="16" Height="16">
|
||
<Path Fill="{StaticResource AppMenuIconAccentBrush}" Data="M11.7,1.4 L14.6,4.3 L5.5,13.4 L2.5,13.9 L3,10.9 Z" />
|
||
<Path Fill="#FFEAF3FB" Data="M10.7,2.4 L13.6,5.3 L12.8,6.1 L9.9,3.2 Z" />
|
||
</Canvas>
|
||
</Viewbox>
|
||
</MenuItem.Icon>
|
||
</MenuItem>
|
||
<MenuItem Header="Удалить"
|
||
Command="{Binding DeleteCommand}">
|
||
<MenuItem.Icon>
|
||
<Viewbox Width="14" Height="14">
|
||
<Canvas Width="16" Height="16">
|
||
<Rectangle Canvas.Left="4" Canvas.Top="5" Width="8" Height="8" RadiusX="1" RadiusY="1" Fill="{StaticResource AppMenuIconDangerBrush}" />
|
||
<Rectangle Canvas.Left="3" Canvas.Top="3" Width="10" Height="2" RadiusX="1" RadiusY="1" Fill="{StaticResource AppMenuIconDangerBrush}" />
|
||
<Rectangle Canvas.Left="6" Canvas.Top="1.5" Width="4" Height="2" RadiusX="1" RadiusY="1" Fill="{StaticResource AppMenuIconDangerBrush}" />
|
||
<Rectangle Canvas.Left="6" Canvas.Top="6.5" Width="1" Height="5" Fill="White" />
|
||
<Rectangle Canvas.Left="9" Canvas.Top="6.5" Width="1" Height="5" Fill="White" />
|
||
</Canvas>
|
||
</Viewbox>
|
||
</MenuItem.Icon>
|
||
</MenuItem>
|
||
</ContextMenu>
|
||
</DataGrid.ContextMenu>
|
||
<DataGrid.RowStyle>
|
||
<Style TargetType="DataGridRow">
|
||
<EventSetter Event="PreviewMouseRightButtonDown"
|
||
Handler="DataGridRow_PreviewMouseRightButtonDown" />
|
||
</Style>
|
||
</DataGrid.RowStyle>
|
||
<DataGrid.Columns>
|
||
<DataGridTextColumn Header="ID"
|
||
Width="70"
|
||
Binding="{Binding Id}" />
|
||
<DataGridTextColumn Header="Вид МК"
|
||
Width="220"
|
||
Binding="{Binding VerificationTypeName}" />
|
||
<DataGridTextColumn Header="Вид клейма"
|
||
Width="*"
|
||
Binding="{Binding StampKindName}" />
|
||
</DataGrid.Columns>
|
||
</DataGrid>
|
||
|
||
<StackPanel Grid.Row="2"
|
||
Margin="0,12,0,0"
|
||
Orientation="Horizontal"
|
||
HorizontalAlignment="Right">
|
||
<Button Width="90"
|
||
IsCancel="True"
|
||
Content="Закрыть" />
|
||
</StackPanel>
|
||
</Grid>
|
||
</Window>
|