KnowledgeWindow.xaml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <Window x:Class="Practics.Views.KnowledgeWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:local="clr-namespace:Practics.Views"
  8. mc:Ignorable="d"
  9. Title="База знаний" Height="450" Width="800">
  10. <Grid>
  11. <Grid.ColumnDefinitions>
  12. <ColumnDefinition Width="150"/>
  13. <ColumnDefinition/>
  14. </Grid.ColumnDefinitions>
  15. <Grid.RowDefinitions>
  16. <RowDefinition Height="1*"/>
  17. <RowDefinition Height="1*"/>
  18. </Grid.RowDefinitions>
  19. <StackPanel Orientation="Vertical">
  20. <Button x:Name="btnAddNew" Content="Новая" Click="btnAddNew_Click"/>
  21. <Button x:Name="btnUpdateAll" Content="Обновить" Click="btnUpdateAll_Click"/>
  22. <Button x:Name="btnExit" Content="Выход" Click="btnExit_Click"/>
  23. </StackPanel>
  24. <DataGrid x:Name="dgNotes" Grid.Column="1" Grid.Row="0" SelectionChanged="dgNotes_SelectionChanged" CanUserAddRows="False" AutoGenerateColumns="False">
  25. <DataGrid.Columns>
  26. <DataGridTextColumn Header="Пользователь" Binding="{Binding LastName}" IsReadOnly="True" />
  27. <DataGridTextColumn Header="Краткое описание" Binding="{Binding NoteName}" />
  28. <DataGridTemplateColumn Header="Создана">
  29. <DataGridTemplateColumn.CellTemplate>
  30. <DataTemplate>
  31. <xctk:DateTimePicker Value="{Binding TimeCreate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  32. </DataTemplate>
  33. </DataGridTemplateColumn.CellTemplate>
  34. </DataGridTemplateColumn>
  35. <DataGridTemplateColumn Header="Обновлена">
  36. <DataGridTemplateColumn.CellTemplate>
  37. <DataTemplate>
  38. <xctk:DateTimePicker Value="{Binding TimeUpdate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
  39. </DataTemplate>
  40. </DataGridTemplateColumn.CellTemplate>
  41. </DataGridTemplateColumn>
  42. </DataGrid.Columns>
  43. </DataGrid>
  44. <StackPanel Grid.Column="1" Grid.Row="1">
  45. <ToolBar>
  46. <Button x:Name="btnSaveNote" Click="btnSaveNote_Click">Save</Button>
  47. <Button x:Name="btnClearNote" Click="btnClearNote_Click">Clear</Button>
  48. </ToolBar>
  49. <RichTextBox Height="190" x:Name="rtbNote"/>
  50. </StackPanel>
  51. </Grid>
  52. </Window>