AssignmentList.xaml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <ContentPage
  3. xmlns="http://xamarin.com/schemas/2014/forms"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
  5. xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"
  6. x:Class="comal.timesheets.AssignmentList"
  7. xmlns:local="clr-namespace:comal.timesheets"
  8. xmlns:schedule="clr-namespace:Syncfusion.SfSchedule.XForms;assembly=Syncfusion.SfSchedule.XForms"
  9. >
  10. <ContentPage.BindingContext>
  11. <local:AssignmentListDataModel x:Name="DataModel"/>
  12. </ContentPage.BindingContext>
  13. <NavigationPage.TitleView>
  14. <Grid Margin="0" Padding="0">
  15. <Grid.ColumnDefinitions>
  16. <ColumnDefinition Width="*"/>
  17. <ColumnDefinition Width="Auto"/>
  18. </Grid.ColumnDefinitions>
  19. <Label
  20. Grid.Column="0"
  21. x:Name="Title"
  22. Text="Assignments"
  23. VerticalOptions="Center"
  24. HorizontalOptions="Center"
  25. HorizontalTextAlignment="Center"
  26. TextColor="White"
  27. FontSize="Medium"
  28. FontAttributes="Bold"
  29. BackgroundColor="Transparent"/>
  30. <StackLayout
  31. Grid.Column="1"
  32. Orientation="Horizontal"
  33. x:Name="Buttons">
  34. <Image
  35. x:Name="SelectDate"
  36. Aspect="AspectFit"
  37. WidthRequest="30"
  38. HorizontalOptions="End"
  39. Margin="5,5,0,5">
  40. <Image.Source>
  41. <OnPlatform x:TypeArguments="ImageSource">
  42. <OnPlatform.Platforms>
  43. <On Platform="iOS" Value="calendar"/>
  44. <On Platform="Android" Value="calendar"/>
  45. </OnPlatform.Platforms>
  46. </OnPlatform>
  47. </Image.Source>
  48. <Image.GestureRecognizers>
  49. <TapGestureRecognizer Tapped="SelectedDate_Tapped"/>
  50. </Image.GestureRecognizers>
  51. </Image>
  52. <DatePicker x:Name="DatePicker" IsVisible="False" DateSelected="DatePicker_OnDateSelected" />
  53. <Image
  54. x:Name="SelectEmployees"
  55. Aspect="AspectFit"
  56. WidthRequest="30"
  57. HorizontalOptions="End"
  58. Margin="5">
  59. <Image.Source>
  60. <OnPlatform x:TypeArguments="ImageSource">
  61. <OnPlatform.Platforms>
  62. <On Platform="iOS" Value="user"/>
  63. <On Platform="Android" Value="user"/>
  64. </OnPlatform.Platforms>
  65. </OnPlatform>
  66. </Image.Source>
  67. <Image.GestureRecognizers>
  68. <TapGestureRecognizer Tapped="SelectEmployees_Tapped"/>
  69. </Image.GestureRecognizers>
  70. </Image>
  71. </StackLayout>
  72. </Grid>
  73. </NavigationPage.TitleView>
  74. <ContentPage.Content>
  75. <Grid>
  76. <Grid.ColumnDefinitions>
  77. <ColumnDefinition Width="*"/>
  78. <ColumnDefinition Width="Auto"/>
  79. </Grid.ColumnDefinitions>
  80. <Grid.RowDefinitions>
  81. <RowDefinition Height="*"/>
  82. <RowDefinition Height="Auto"/>
  83. </Grid.RowDefinitions>
  84. <schedule:SfSchedule
  85. x:Name="Schedule"
  86. Grid.Row="0"
  87. Grid.RowSpan="2"
  88. Grid.Column="0"
  89. Grid.ColumnSpan="2"
  90. ScheduleView="DayView"
  91. HeaderHeight="0"
  92. ViewHeaderHeight="0"
  93. TimeInterval="60"
  94. TimeIntervalHeight="100"
  95. VisibleDatesChangedEvent="Schedule_OnVisibleDatesChangedEvent"
  96. DataSource="{Binding Items}"
  97. CellTapped="Schedule_OnCellTapped"
  98. CellLongPressed="Schedule_OnCellLongPressed">
  99. <schedule:SfSchedule.AppointmentMapping>
  100. <schedule:ScheduleAppointmentMapping
  101. IdMapping="Id"
  102. SubjectMapping="Subject"
  103. ColorMapping="Color"
  104. StartTimeMapping="From"
  105. EndTimeMapping="To"
  106. NotesMapping="Notes"
  107. TextColorMapping="TextColor">
  108. </schedule:ScheduleAppointmentMapping>
  109. </schedule:SfSchedule.AppointmentMapping>
  110. <!-- <schedule:SfSchedule.AppointmentTemplate> -->
  111. <!-- <DataTemplate> -->
  112. <!-- <Frame CornerRadius="5" HasShadow="false" Padding="2" Background="Red"> -->
  113. <!-- <Grid> -->
  114. <!-- <Grid.ColumnDefinitions> -->
  115. <!-- <ColumnDefinition Width="Auto"/> -->
  116. <!-- <ColumnDefinition Width="*"/> -->
  117. <!-- </Grid.ColumnDefinitions> -->
  118. <!-- <Grid.RowDefinitions> -->
  119. <!-- <RowDefinition Height="Auto"/> -->
  120. <!-- <RowDefinition Height="*"/> -->
  121. <!-- </Grid.RowDefinitions> -->
  122. <!-- <Label Grid.Row="0" Grid.Column="0" Text="{Binding Number}"/> -->
  123. <!-- <Label Grid.Row="0" Grid.Column="1" Text="Task Title"/> -->
  124. <!-- <Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Text="Task Description"/> -->
  125. <!-- </Grid> -->
  126. <!-- </Frame> -->
  127. <!-- </DataTemplate> -->
  128. <!-- </schedule:SfSchedule.AppointmentTemplate> -->
  129. </schedule:SfSchedule>
  130. <Button
  131. x:Name="AddButton"
  132. Grid.Row="1"
  133. Grid.Column="1"
  134. Margin="0,0,10,10"
  135. HeightRequest="50"
  136. WidthRequest="50"
  137. CornerRadius="50"
  138. Text="+"
  139. BorderWidth="0"
  140. Background="Red"
  141. Clicked="AddButton_OnClicked"/>
  142. </Grid>
  143. </ContentPage.Content>
  144. </ContentPage>