edit
This commit is contained in:
@@ -44,6 +44,53 @@
|
||||
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="90"
|
||||
@@ -66,18 +113,6 @@
|
||||
Margin="0,12,0,0"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Right">
|
||||
<Button Width="110"
|
||||
Margin="0,0,8,0"
|
||||
Command="{Binding AddCommand}"
|
||||
Content="Добавить" />
|
||||
<Button Width="110"
|
||||
Margin="0,0,8,0"
|
||||
Command="{Binding EditCommand}"
|
||||
Content="Изменить" />
|
||||
<Button Width="110"
|
||||
Margin="0,0,8,0"
|
||||
Command="{Binding DeleteCommand}"
|
||||
Content="Удалить" />
|
||||
<Button Width="90"
|
||||
IsCancel="True"
|
||||
Content="Закрыть" />
|
||||
|
||||
Reference in New Issue
Block a user