StockMovementPanel.xaml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <UserControl x:Class="PRSDesktop.StockMovementPanel"
  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:PRSDesktop"
  7. xmlns:syncfusion="http://schemas.syncfusion.com/wpf"
  8. mc:Ignorable="d"
  9. d:DesignHeight="450" d:DesignWidth="800">
  10. <UserControl.Resources>
  11. <ControlTemplate x:Key="VerticalSplitter">
  12. <Grid Background="{TemplateBinding Background}" Width="4">
  13. <Button x:Name="PART_Left" Visibility="Collapsed" />
  14. <Button x:Name="PART_Right" Visibility="Collapsed" />
  15. <StackPanel Margin="0" Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
  16. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  17. Margin="0,2,0,0" />
  18. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  19. Margin="0,2,0,0" />
  20. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  21. Margin="0,2,0,0" />
  22. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  23. Margin="0,2,0,0" />
  24. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  25. Margin="0,2,0,0" />
  26. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  27. Margin="0,2,0,0" />
  28. <Ellipse Fill="Silver" HorizontalAlignment="Center" Height="2" Width="2" Opacity="1"
  29. Margin="0,2,0,0" />
  30. </StackPanel>
  31. </Grid>
  32. </ControlTemplate>
  33. </UserControl.Resources>
  34. <Grid x:Name="Grid">
  35. <Grid.ColumnDefinitions>
  36. <ColumnDefinition Width="0" />
  37. <ColumnDefinition Width="0" />
  38. <ColumnDefinition Width="*" />
  39. </Grid.ColumnDefinitions>
  40. <Grid.RowDefinitions>
  41. <RowDefinition Height="Auto" />
  42. <RowDefinition Height="*" />
  43. </Grid.RowDefinitions>
  44. <Border Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" CornerRadius="5,5,0,0" Padding="5"
  45. Background="WhiteSmoke" BorderBrush="Gray" BorderThickness="0.75" Margin="0,0,0,3">
  46. <Grid>
  47. <Grid.ColumnDefinitions>
  48. <ColumnDefinition Width="Auto" />
  49. <ColumnDefinition Width="Auto" />
  50. <ColumnDefinition Width="Auto" />
  51. <ColumnDefinition Width="Auto" />
  52. <ColumnDefinition Width="Auto" />
  53. <ColumnDefinition Width="Auto" />
  54. <ColumnDefinition Width="*" />
  55. <ColumnDefinition Width="Auto" />
  56. </Grid.ColumnDefinitions>
  57. <Label Grid.Column="0" Content="Date Range" VerticalContentAlignment="Center" />
  58. <ComboBox x:Name="View" Grid.Column="1" MinWidth="100" VerticalContentAlignment="Center"
  59. SelectedIndex="0" SelectionChanged="View_SelectionChanged">
  60. <ComboBoxItem Content="Today" />
  61. <ComboBoxItem Content="Yesterday" />
  62. <ComboBoxItem Content="This Week" />
  63. <ComboBoxItem Content="Last Week" />
  64. <ComboBoxItem Content="This Month" />
  65. <ComboBoxItem Content="Last Month" />
  66. <ComboBoxItem Content="This Year" />
  67. <ComboBoxItem Content="Last Year" />
  68. <ComboBoxItem Content="Custom" />
  69. </ComboBox>
  70. <Label x:Name="StartLabel" Grid.Column="2" Content="Starting" VerticalContentAlignment="Center" />
  71. <DatePicker x:Name="StartPicker" Grid.Column="3" MinWidth="100" VerticalContentAlignment="Center"
  72. IsEnabled="False" SelectedDateChanged="SelectedDateChanged" />
  73. <Label x:Name="EndLabel" Grid.Column="4" Content="Ending" VerticalContentAlignment="Center" />
  74. <DatePicker x:Name="EndPicker" Grid.Column="5" MinWidth="100" VerticalContentAlignment="Center"
  75. SelectedDateChanged="SelectedDateChanged" />
  76. <DockPanel Grid.Column="7">
  77. <CheckBox x:Name="ShowBatches" VerticalContentAlignment="Center" DockPanel.Dock="Right"
  78. Checked="ShowBatches_Checked" Unchecked="ShowBatches_Checked" />
  79. <Label Content="Show Batches?" VerticalContentAlignment="Center" DockPanel.Dock="Left" />
  80. </DockPanel>
  81. </Grid>
  82. </Border>
  83. <local:StockBatchGrid x:Name="Batches" Grid.Row="1" Grid.Column="0" />
  84. <syncfusion:SfGridSplitter Grid.Row="1" Grid.Column="1" ResizeBehavior="PreviousAndNext" Width="4"
  85. Background="Transparent" Template="{StaticResource VerticalSplitter}">
  86. <syncfusion:SfGridSplitter.PreviewStyle>
  87. <Style TargetType="Control">
  88. <Setter Property="Background" Value="Gray" />
  89. <Setter Property="Template">
  90. <Setter.Value>
  91. <ControlTemplate TargetType="Control">
  92. <Grid x:Name="Root" Opacity="0.5">
  93. <Rectangle Fill="{TemplateBinding Background}" />
  94. </Grid>
  95. </ControlTemplate>
  96. </Setter.Value>
  97. </Setter>
  98. </Style>
  99. </syncfusion:SfGridSplitter.PreviewStyle>
  100. </syncfusion:SfGridSplitter>
  101. <local:ProductStockMovementGrid x:Name="Movements" AllowNullLocation="True" AllowNullBatch="True" Grid.Row="1"
  102. Grid.Column="2" OnReconfigure="Movements_OnReconfigure"/>
  103. </Grid>
  104. </UserControl>