DynamicMultiEditWindow.xaml 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <wpf:ThemableWindow x:Class="InABox.DynamicGrid.DynamicMultiEditWindow"
  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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:sf="http://schemas.syncfusion.com/wpf"
  7. xmlns:sf2="clr-namespace:Syncfusion.UI.Xaml.Grid;assembly=Syncfusion.SfGrid.WPF"
  8. xmlns:wpf="clr-namespace:InABox.Wpf;assembly=InABox.Wpf"
  9. mc:Ignorable="d"
  10. Title="Edit Multiple Items" Height="450" Width="800" WindowStartupLocation="CenterScreen">
  11. <Window.Resources>
  12. <Style TargetType="sf2:VirtualizingCellsControl" x:Key="rowStyle">
  13. <Setter Property="Background" Value="White" />
  14. </Style>
  15. <Style TargetType="sf:GridHeaderCellControl" x:Key="headerStyle">
  16. <Setter Property="Background" Value="LightSkyBlue" />
  17. <Setter Property="FontWeight" Value="DemiBold" />
  18. <Setter Property="Foreground" Value="Black" />
  19. </Style>
  20. </Window.Resources>
  21. <Grid>
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="Auto" />
  24. <ColumnDefinition Width="*" />
  25. <ColumnDefinition Width="Auto" />
  26. <ColumnDefinition Width="Auto" />
  27. </Grid.ColumnDefinitions>
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="*" />
  30. <RowDefinition Height="Auto" />
  31. </Grid.RowDefinitions>
  32. <sf:SfDataGrid x:Name="Editor"
  33. Grid.Row="0"
  34. Grid.Column="0"
  35. Grid.ColumnSpan="4"
  36. BorderBrush="Gray"
  37. BorderThickness="0.75"
  38. Background="WhiteSmoke"
  39. AutoGenerateColumns="False"
  40. AllowEditing="True"
  41. EditTrigger="OnTap"
  42. ColumnSizer="Auto"
  43. RowStyle="{StaticResource rowStyle}"
  44. HeaderStyle="{StaticResource headerStyle}"
  45. HeaderRowHeight="30"
  46. RowHeight="30"
  47. AllowFiltering="True"
  48. RowSelectionBrush="LightBlue"
  49. CurrentCellBorderThickness="0.75"
  50. Margin="2"
  51. CurrentCellEndEdit="Editor_CurrentCellEndEdit"
  52. CurrentCellValueChanged="Editor_CurrentCellValueChanged"
  53. AddNewRowPosition="Bottom"
  54. SelectionUnit="Cell"
  55. NavigationMode="Cell"
  56. CurrentCellActivated="CurrentCellActivated"
  57. CurrentCellDropDownSelectionChanged="Editor_CurrentCellDropDownSelectionChanged" />
  58. <Button x:Name="Delete" Grid.Row="1" Grid.Column="0" Width="80" Margin="2,0,0,2" Content="Delete Row"
  59. Padding="5" Click="Delete_Click" />
  60. <Button x:Name="OK" Grid.Row="1" Grid.Column="2" Width="80" Margin="0,0,2,2" Content="OK" Padding="5"
  61. Click="OK_Click" />
  62. <Button x:Name="Cancel" Grid.Row="1" Grid.Column="3" Width="80" Margin="0,0,2,2" Content="Cancel" Padding="5"
  63. Click="Cancel_Click" />
  64. </Grid>
  65. </wpf:ThemableWindow>