TasksByStatusControlOld.xaml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. <UserControl
  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:wpf="clr-namespace:InABox.Wpf;assembly=InABox.Wpf"
  8. xmlns:Kanban="clr-namespace:Syncfusion.UI.Xaml.Kanban;assembly=Syncfusion.SfKanban.WPF"
  9. x:Class="PRSDesktop.TasksByStatusControlOld"
  10. mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="400">
  11. <UserControl.Resources>
  12. <local:StatusTasksHeaderTimeConverter x:Key="StatusTasksHeaderTimeConverter" />
  13. <wpf:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
  14. <DataTemplate x:Key="KanbanHeader">
  15. <!--<Border BorderThickness="0.75" BorderBrush="Gray" CornerRadius="5,5,0,0" Margin="0,10,0,0" Padding="5" Width="{Binding Converter={StaticResource TaskHeaderWidthConverter}}" Background="WhiteSmoke">-->
  16. <StackPanel Orientation="Vertical">
  17. <TextBlock Text="{Binding Header}" FontSize="16" FontWeight="DemiBold" HorizontalAlignment="Left"
  18. Margin="10,0,10,0" />
  19. <TextBlock FontSize="12" HorizontalAlignment="Left" Margin="10,0,5,0">
  20. <Run Text="{Binding CardCount}" />
  21. <Run Text="Tasks /" />
  22. <Run Text="{Binding Converter={StaticResource StatusTasksHeaderTimeConverter}, Mode=OneWay}" />
  23. <Run Text="Hours" />
  24. </TextBlock>
  25. </StackPanel>
  26. <!--</Border>-->
  27. </DataTemplate>
  28. </UserControl.Resources>
  29. <Grid>
  30. <Grid.ColumnDefinitions>
  31. <ColumnDefinition Width="Auto" x:Name="EmployeeListColumn" />
  32. <ColumnDefinition Width="*" />
  33. </Grid.ColumnDefinitions>
  34. <Grid.RowDefinitions>
  35. <RowDefinition Height="Auto" />
  36. <RowDefinition Height="*" />
  37. </Grid.RowDefinitions>
  38. <Border Grid.Row="0" Grid.Column="0" CornerRadius="5,5,0,0" BorderBrush="Gray" BorderThickness="0.75"
  39. Background="WhiteSmoke" Padding="5" Margin="0,0,4,2">
  40. <Label Content="Employee List" HorizontalContentAlignment="Center" />
  41. </Border>
  42. <ListView Grid.Column="0" Grid.Row="1" x:Name="Employees" HorizontalAlignment="Stretch"
  43. SelectionChanged="Employees_SelectionChanged" Margin="0,0,4,0" Background="White" BorderBrush="Gray"
  44. BorderThickness="0.75">
  45. <ListView.ItemTemplate>
  46. <DataTemplate>
  47. <Grid HorizontalAlignment="Stretch" Margin="4,2,4,2">
  48. <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
  49. <Border Width="40" Height="40" CornerRadius="20" BorderBrush="Black" BorderThickness="1"
  50. VerticalAlignment="Center" HorizontalAlignment="Center">
  51. <Border.Background>
  52. <ImageBrush ImageSource="{Binding Path=Image}" Stretch="UniformToFill" />
  53. </Border.Background>
  54. </Border>
  55. <TextBlock x:Name="PCName" Height="Auto" TextWrapping="Wrap" Width="80" Margin="4,0,0,0"
  56. TextAlignment="Left" Text="{Binding Name}" VerticalAlignment="Center" />
  57. </StackPanel>
  58. </Grid>
  59. </DataTemplate>
  60. </ListView.ItemTemplate>
  61. </ListView>
  62. <Border Grid.Row="0" Grid.Column="1" CornerRadius="5,5,0,0" BorderBrush="Gray" BorderThickness="0.75"
  63. Background="WhiteSmoke" Padding="5" Margin="0,0,0,2">
  64. <DockPanel>
  65. <Button DockPanel.Dock="Left" x:Name="TaskTypesLabel" Content="Filter" Padding="4,0" Click="TaskTypesLabel_OnClick" />
  66. <ComboBox DockPanel.Dock="Left" x:Name="TaskTypes" Margin="5,0,0,0" Width="150" SelectedIndex="0"
  67. SelectionChanged="TaskTypes_SelectionChanged" VerticalContentAlignment="Center"
  68. SelectedValuePath="Key" DisplayMemberPath="Value" />
  69. <Button DockPanel.Dock="Left" x:Name="JobFilterBtn" Content="Filter Job" Padding="4,0" Margin="5,0,0,0" Click="JobFilterBtn_OnClick" />
  70. <Label DockPanel.Dock="Left" Content="Search" Margin="5,0,0,0" />
  71. <Button DockPanel.Dock="Right" x:Name="Export" Padding="10,0" Margin="5,0,0,0" Content="Export"
  72. Click="Export_Click" />
  73. <CheckBox DockPanel.Dock="Right" x:Name="IncludeCompleted" Margin="10,0,5,0"
  74. Content="Include Completed" VerticalAlignment="Center" HorizontalAlignment="Right"
  75. Checked="IncludeCompleted_Checked" Unchecked="IncludeCompleted_Checked" />
  76. <CheckBox DockPanel.Dock="Right" x:Name="IncludeObserved" Margin="10,0,5,0" Content="Include Observing"
  77. VerticalAlignment="Center" HorizontalAlignment="Right" Checked="IncludeObserved_Checked"
  78. Unchecked="IncludeObserved_Checked" />
  79. <CheckBox DockPanel.Dock="Right" x:Name="IncludeLocked" Margin="10,0,5,0" Content="Include Locked"
  80. VerticalAlignment="Center" HorizontalAlignment="Right" Checked="IncludeLocked_Checked"
  81. Unchecked="IncludeLocked_Checked" />
  82. <ComboBox DockPanel.Dock="Right" x:Name="ViewType" Margin="5,0,0,0" Width="100" SelectedIndex="0"
  83. SelectionChanged="ViewType_SelectionChanged" VerticalContentAlignment="Center">
  84. <ComboBoxItem Content="Full" />
  85. <ComboBoxItem Content="Compact" />
  86. </ComboBox>
  87. <Label DockPanel.Dock="Right" x:Name="ViewTypeLabel" Content="View" Margin="5,0,0,0" />
  88. <TextBox DockPanel.Dock="Left" x:Name="Search" Margin="5,0,0,0" HorizontalAlignment="Stretch"
  89. VerticalContentAlignment="Center" KeyUp="Search_KeyUp" />
  90. </DockPanel>
  91. </Border>
  92. <Kanban:SfKanban
  93. x:Name="Kanban"
  94. Grid.Column="1"
  95. Grid.Row="1"
  96. Margin="0"
  97. HorizontalAlignment="Stretch"
  98. VerticalAlignment="Stretch"
  99. HorizontalContentAlignment="Stretch"
  100. VerticalContentAlignment="Stretch"
  101. AutoGenerateColumns="False"
  102. BorderBrush="Gray"
  103. BorderThickness="0.75"
  104. Background="WhiteSmoke"
  105. CardTemplate="{StaticResource FullKanban}"
  106. ColumnHeaderTemplate="{StaticResource KanbanHeader}"
  107. SizeChanged="Kanban_SizeChanged"
  108. CardDragStart="Kanban_CardDragStart"
  109. CardDragEnd="Kanban_CardDragEnd" />
  110. </Grid>
  111. </UserControl>