SchedulePanel.xaml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <UserControl x:Class="PRSDesktop.SchedulePanel"
  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:schedule="http://schemas.syncfusion.com/wpf"
  7. mc:Ignorable="d"
  8. d:DesignHeight="400" d:DesignWidth="900">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition Width="120" />
  12. <ColumnDefinition Width="*" />
  13. </Grid.ColumnDefinitions>
  14. <ListView Grid.Column="0" Grid.Row="0" x:Name="Factories" HorizontalAlignment="Stretch"
  15. SelectionChanged="Factories_SelectionChanged">
  16. <ListView.ItemTemplate>
  17. <DataTemplate>
  18. <Grid HorizontalAlignment="Stretch" Margin="0,10,0,0">
  19. <StackPanel Orientation="Vertical" HorizontalAlignment="Center">
  20. <Border Width="80" Height="80" CornerRadius="20,20,20,20" BorderBrush="Black"
  21. BorderThickness="1" VerticalAlignment="Center" HorizontalAlignment="Center">
  22. <Border.Background>
  23. <ImageBrush ImageSource="{Binding Path=Item2}" Stretch="UniformToFill" />
  24. </Border.Background>
  25. </Border>
  26. <TextBlock x:Name="PCName" Height="20" TextWrapping="Wrap" HorizontalAlignment="Center"
  27. Width="100" TextAlignment="Center" Text="{Binding Item1}" />
  28. </StackPanel>
  29. </Grid>
  30. </DataTemplate>
  31. </ListView.ItemTemplate>
  32. </ListView>
  33. <schedule:SfSchedule Grid.Column="1" Grid.Row="0" Name="Schedule" Resource="Stations" WorkStartHour="7"
  34. WorkEndHour="16" ShowNonWorkingHours="False" ShowAllDay="False" AllowEditing="False"
  35. SizeChanged="Schedule_SizeChanged">
  36. <schedule:SfSchedule.AppointmentTemplate>
  37. <DataTemplate>
  38. <Border BorderBrush="Black" BorderThickness="0.75" CornerRadius="5"
  39. Background="{Binding AppointmentBackground}" Margin="0,0,0,0">
  40. <Grid Margin="5,5,5,5">
  41. <Grid.ColumnDefinitions>
  42. <ColumnDefinition Width="*" />
  43. <ColumnDefinition Width="*" />
  44. </Grid.ColumnDefinitions>
  45. <Grid.RowDefinitions>
  46. <RowDefinition Height="Auto" />
  47. <RowDefinition Height="Auto" />
  48. </Grid.RowDefinitions>
  49. <TextBlock Grid.Row="0" Grid.Column="0" Text="{Binding SetoutNumber}" FontWeight="Bold"
  50. FontSize="10" Foreground="{Binding AppointmentForeground}" />
  51. <TextBlock Grid.Row="0" Grid.Column="1" Text="{Binding Subject}" FontWeight="Bold"
  52. FontSize="10" Foreground="{Binding AppointmentForeground}" />
  53. <TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" FontSize="8"
  54. HorizontalAlignment="Left" Text="{Binding SetoutDescription}"
  55. TextWrapping="Wrap" Foreground="{Binding AppointmentForeground}" />
  56. </Grid>
  57. </Border>
  58. </DataTemplate>
  59. </schedule:SfSchedule.AppointmentTemplate>
  60. <!--<schedule:SfSchedule.AppointmentTemplate>
  61. <DataTemplate>
  62. <Grid>
  63. <Rectangle Fill="{Binding AppointmentBackground}"></Rectangle>
  64. <Grid>
  65. <Grid.RowDefinitions>
  66. <RowDefinition Height="0.25*" />
  67. <RowDefinition Height="0.75*" />
  68. </Grid.RowDefinitions>
  69. <Grid.ColumnDefinitions>
  70. <ColumnDefinition />
  71. <ColumnDefinition />
  72. </Grid.ColumnDefinitions>
  73. <TextBlock Margin="10,2,0,0" Text="{Binding Subject}" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="20" Foreground="White" FontWeight="Light" FontFamily="Segoe UI"></TextBlock>
  74. <Image Source="c:/Development/Shared.png" Grid.Row="1" HorizontalAlignment="Left" VerticalAlignment="Center" Stretch="None" />
  75. <TextBlock Text="{Binding StartTime}" Grid.Row="1" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" FontSize="20" Foreground="White" FontWeight="Light" FontFamily="Segoe UI" TextWrapping="NoWrap" />
  76. </Grid>
  77. </Grid>
  78. </DataTemplate>
  79. </schedule:SfSchedule.AppointmentTemplate>-->
  80. </schedule:SfSchedule>
  81. </Grid>
  82. </UserControl>