TodoControl.xaml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <UserControl x:Class="GeekDesk.Control.UserControls.Backlog.TodoControl"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:GeekDesk.Control.UserControls.PannelCard"
  7. xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:viewmodel="clr-namespace:GeekDesk.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:ToDoInfo}"
  8. mc:Ignorable="d"
  9. Background="Transparent"
  10. >
  11. <hc:SimplePanel Margin="20" Background="Transparent">
  12. <Grid Background="Transparent">
  13. <DataGrid x:Name="BacklogList"
  14. HeadersVisibility="All"
  15. AutoGenerateColumns="False"
  16. ItemsSource="{Binding}"
  17. IsReadOnly="True"
  18. Initialized="DataGridMenu_Initialized"
  19. >
  20. <DataGrid.ContextMenu>
  21. <ContextMenu x:Name="Menu" Width="120">
  22. <MenuItem Header="详情" Click="DetailMenu_Click"/>
  23. <MenuItem Header="删除" Click="DeleteMenu_Click"/>
  24. </ContextMenu>
  25. </DataGrid.ContextMenu>
  26. <DataGrid.RowStyle>
  27. <Style TargetType="DataGridRow" BasedOn="{StaticResource DataGridRowStyle}">
  28. <EventSetter Event="MouseRightButtonDown" Handler="DataGridRow_MouseRightButtonDown" />
  29. <Setter Property="Background" Value="White"/>
  30. <Style.Triggers>
  31. <Trigger Property="IsSelected" Value="True">
  32. <Setter Property="Background" Value="{StaticResource BtnBG}"/>
  33. </Trigger>
  34. <Trigger Property="IsSelected" Value="False">
  35. <Setter Property="Background" Value="White"/>
  36. </Trigger>
  37. </Style.Triggers>
  38. </Style>
  39. </DataGrid.RowStyle>
  40. <DataGrid.CellStyle>
  41. <Style TargetType="DataGridCell" BasedOn="{StaticResource DataGridCellStyle}">
  42. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  43. <Setter Property="Background" Value="Transparent"/>
  44. <Style.Triggers>
  45. <Trigger Property="IsSelected" Value="True">
  46. <Setter Property="Background" Value="Transparent"/>
  47. <Setter Property="Foreground" Value="Black"/>
  48. </Trigger>
  49. </Style.Triggers>
  50. </Style>
  51. </DataGrid.CellStyle>
  52. <DataGrid.ColumnHeaderStyle>
  53. <Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource DataGridColumnHeaderStyle}">
  54. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  55. </Style>
  56. </DataGrid.ColumnHeaderStyle>
  57. <DataGrid.Background>
  58. <SolidColorBrush Color="Transparent"/>
  59. </DataGrid.Background>
  60. <DataGrid.Columns>
  61. <DataGridTextColumn Width="120" Binding="{Binding Title}" Header="待办任务"/>
  62. <DataGridTextColumn Width="210" Binding="{Binding Msg}" Header="待办详情"/>
  63. <DataGridTextColumn Width="147" Binding="{Binding ExeTime}" Header="待办时间"/>
  64. <DataGridTextColumn Width="147" Binding="{Binding DoneTime}" Header="完成时间"/>
  65. </DataGrid.Columns>
  66. </DataGrid>
  67. <StackPanel hc:Growl.GrowlParent="True" hc:Growl.Token="DeleteConfirm" VerticalAlignment="Center" Margin="0,10,10,50"/>
  68. </Grid>
  69. </hc:SimplePanel>
  70. </UserControl>