AssignmentColumn.xaml 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <ContentView xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  4. xmlns:schedule="clr-namespace:Syncfusion.SfSchedule.XForms;assembly=Syncfusion.SfSchedule.XForms"
  5. xmlns:ui="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
  6. x:Class="comal.timesheets.iOS.Assignments.AssignmentColumn">
  7. <ContentView.Content>
  8. <StackLayout Orientation="Vertical">
  9. <ui:MaterialButton x:Name="Header"/>
  10. <schedule:SfSchedule
  11. x:Name="Schedule"
  12. HeightRequest="1240"
  13. ScheduleView="DayView"
  14. HeaderHeight="0"
  15. ViewHeaderHeight="0"
  16. TimeInterval="60"
  17. Background="Red"
  18. DataSource="{Binding Items}"
  19. CellTapped="Schedule_OnCellTapped"
  20. CellLongPressed="Schedule_OnCellLongPressed"
  21. ShowResourceView="False"
  22. EnableNavigation="False"
  23. VerticalOptions="Fill"
  24. FocusChangeRequested="Schedule_OnFocusChangeRequested"
  25. Focused="Schedule_OnFocused"
  26. >
  27. <schedule:SfSchedule.DayViewSettings>
  28. <schedule:DayViewSettings TimeRulerSize="0"/>
  29. </schedule:SfSchedule.DayViewSettings>
  30. <schedule:SfSchedule.AppointmentMapping>
  31. <schedule:ScheduleAppointmentMapping
  32. IdMapping="Id"
  33. SubjectMapping="Subject"
  34. ColorMapping="Color"
  35. StartTimeMapping="From"
  36. EndTimeMapping="To"
  37. NotesMapping="Notes"
  38. TextColorMapping="TextColor">
  39. </schedule:ScheduleAppointmentMapping>
  40. </schedule:SfSchedule.AppointmentMapping>
  41. <schedule:SfSchedule.AppointmentTemplate>
  42. <DataTemplate>
  43. <Frame BorderColor="Gray" CornerRadius="2" Margin="1" HasShadow="False" Padding="2" Background="{Binding Color}">
  44. <Grid>
  45. <Grid.ColumnDefinitions>
  46. <ColumnDefinition Width="*"/>
  47. <ColumnDefinition Width="Auto"/>
  48. </Grid.ColumnDefinitions>
  49. <Grid.RowDefinitions>
  50. <RowDefinition Height="Auto"/>
  51. <RowDefinition Height="*"/>
  52. </Grid.RowDefinitions>
  53. <Label Grid.Row="0" Grid.Column="0" FontAttributes="Bold" FontSize="Small" Text="{Binding Subject}" />
  54. <Image Grid.Row="0" Grid.Column="1" Source="gear" HeightRequest="32" WidthRequest="32" IsVisible="{Binding Completed}"/>
  55. <Label Grid.Row="1" Grid.Column="0" FontSize="Small" Text="{Binding Notes}" />
  56. </Grid>
  57. </Frame>
  58. </DataTemplate>
  59. </schedule:SfSchedule.AppointmentTemplate>
  60. </schedule:SfSchedule>
  61. </StackLayout>
  62. </ContentView.Content>
  63. </ContentView>