| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315 | <?xml version="1.0" encoding="UTF-8"?><ContentPage    xmlns="http://xamarin.com/schemas/2014/forms"    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"    xmlns:material="clr-namespace:XF.Material.Forms.UI;assembly=XF.Material"    x:Class="comal.timesheets.AssignmentList"    xmlns:local="clr-namespace:comal.timesheets"    xmlns:schedule="clr-namespace:Syncfusion.SfSchedule.XForms;assembly=Syncfusion.SfSchedule.XForms">    <ContentPage.Resources>        <ResourceDictionary>            <DataTemplate x:Key="DayViewAppointments">                <Grid>                    <Grid.ColumnDefinitions>                        <ColumnDefinition Width="*"/>                        <ColumnDefinition Width="Auto"/>                    </Grid.ColumnDefinitions>                    <Grid.RowDefinitions>                        <RowDefinition Height="Auto"/>                        <RowDefinition Height="*"/>                    </Grid.RowDefinitions>                    <Frame Grid.ColumnSpan="2" Grid.RowSpan="2" BorderColor="Gray" Margin="1" CornerRadius="5" HasShadow="False" Background="{Binding Color}" />                    <Label Grid.Row="0" Grid.Column="0" Margin="5,2,0,0" FontAttributes="Bold" FontSize="Small" Text="{Binding Subject}" />                    <Image Grid.Row="0" Grid.Column="1" Margin="0,2,5,0" Source="gear" HeightRequest="32" WidthRequest="32" IsVisible="{Binding Completed}"/>                    <Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Margin="5,0,2,5" FontSize="Small" Text="{Binding Notes}" />                </Grid>            </DataTemplate>                <schedule:ScheduleAppointmentMapping x:Key="AppointmentMapping"                IdMapping="Id"                SubjectMapping="Subject"                ColorMapping="Color"                StartTimeMapping="StartTime"                EndTimeMapping="EndTime"                NotesMapping="Notes"                TextColorMapping="TextColor"                ResourceIdsMapping="ResourceIds"                >            </schedule:ScheduleAppointmentMapping>            </ResourceDictionary>    </ContentPage.Resources>        <ContentPage.BindingContext>        <local:AssignmentListDataModel x:Name="DataModel"/>    </ContentPage.BindingContext>        <NavigationPage.TitleView>        <Grid Margin="0" Padding="0">            <Grid.ColumnDefinitions>                <ColumnDefinition Width="*"/>                <ColumnDefinition Width="Auto"/>            </Grid.ColumnDefinitions>            <Label                 Grid.Column="0"                 x:Name="Title"                Text="Assignments"                 VerticalOptions="Center"                HorizontalOptions="Center"                 HorizontalTextAlignment="Center"                 TextColor="White"                 FontSize="Medium"                FontAttributes="Bold"                 BackgroundColor="Transparent"/>            <StackLayout                 Grid.Column="1"                 Orientation="Horizontal"                x:Name="Buttons">                <Image                     x:Name="SelectDate"                     Aspect="AspectFit"                     WidthRequest="30"                     HorizontalOptions="End"                     Margin="5,5,0,5">                                        <Image.Source>                        <OnPlatform x:TypeArguments="ImageSource">                            <OnPlatform.Platforms>                                <On Platform="iOS" Value="calendar"/>                                <On Platform="Android" Value="calendar"/>                            </OnPlatform.Platforms>                        </OnPlatform>                    </Image.Source>                    <Image.GestureRecognizers>                        <TapGestureRecognizer Tapped="SelectedDate_Tapped"/>                    </Image.GestureRecognizers>                </Image>                                <DatePicker x:Name="DatePicker" IsVisible="False" DateSelected="DatePicker_OnDateSelected" />                <Image                     x:Name="SelectEmployees"                     Aspect="AspectFit"                     WidthRequest="30"                     HorizontalOptions="End"                     Margin="5">                    <Image.Source>                        <OnPlatform x:TypeArguments="ImageSource">                            <OnPlatform.Platforms>                                <On Platform="iOS" Value="user"/>                                <On Platform="Android" Value="user"/>                            </OnPlatform.Platforms>                        </OnPlatform>                    </Image.Source>                    <Image.GestureRecognizers>                        <TapGestureRecognizer Tapped="SelectEmployees_Tapped"/>                    </Image.GestureRecognizers>                </Image>                <Image                     x:Name="CollapseButton"                     Aspect="AspectFit"                     WidthRequest="30"                     HorizontalOptions="End"                     Margin="5">                                        <Image.Source>                        <OnPlatform x:TypeArguments="ImageSource">                            <OnPlatform.Platforms>                                <On Platform="iOS" Value="downarrowwhite"/>                                <On Platform="Android" Value="downarrowwhite"/>                            </OnPlatform.Platforms>                        </OnPlatform>                    </Image.Source>                    <Image.GestureRecognizers>                        <TapGestureRecognizer Tapped="CollapseButton_Tapped"/>                    </Image.GestureRecognizers>                </Image>                <Image                     x:Name="ExpandButton"                     Aspect="AspectFit"                     WidthRequest="30"                     HorizontalOptions="End"                     IsVisible="false"                    Margin="5">                    <Image.Source>                        <OnPlatform x:TypeArguments="ImageSource">                            <OnPlatform.Platforms>                                <On Platform="iOS" Value="rightarrowwhite"/>                                <On Platform="Android" Value="rightarrowwhite"/>                            </OnPlatform.Platforms>                        </OnPlatform>                    </Image.Source>                    <Image.GestureRecognizers>                        <TapGestureRecognizer Tapped="ExpandButton_Tapped"/>                    </Image.GestureRecognizers>                </Image>            </StackLayout>        </Grid>    </NavigationPage.TitleView>        <ContentPage.Content>        <Grid>            <Grid.ColumnDefinitions>                <ColumnDefinition Width="*" x:Name="DayViewColumn"/>                <ColumnDefinition Width="0" x:Name="TimeLineViewColumn"/>                <ColumnDefinition Width="150" x:Name="JobColumn" />            </Grid.ColumnDefinitions>            <Grid.RowDefinitions>                <RowDefinition Height="40"/>                <RowDefinition Height="*"/>            </Grid.RowDefinitions>                        <Frame                 Grid.Row="0"                Grid.Column="0"                Grid.ColumnSpan="2"                CornerRadius="2"                BorderColor="Silver"                BackgroundColor="WhiteSmoke"                HasShadow="False"                Margin="0"                Padding="2"                >                <Label                     x:Name="ScheduleType"                     HorizontalOptions="Fill"                     VerticalOptions="Fill"                     VerticalTextAlignment="Center"                     HorizontalTextAlignment="Center"                    FontSize="Micro"/>            </Frame>                        <schedule:SfSchedule                  x:Name="DayView"                Grid.Row="1"                Grid.Column="0"                ScheduleView="DayView"                 HeaderHeight="0"                ViewHeaderHeight="0"                TimeInterval="30"                Background="White"                EnableNavigation="False"                VerticalOptions="Fill"                ShowResourceView="False"                ResourceViewMode="Absolute"                TimeIntervalHeight="150"                AllowAppointmentDrag="True"                AppointmentMapping="{StaticResource AppointmentMapping}"                AppointmentTemplate="{StaticResource DayViewAppointments}"                CellTapped="Schedule_OnCellTapped"                CellLongPressed="Schedule_OnCellLongPressed"            >                                <schedule:SfSchedule.DayViewSettings>                    <schedule:DayViewSettings TimeRulerSize="50"/>                </schedule:SfSchedule.DayViewSettings>                            </schedule:SfSchedule>                        <schedule:SfSchedule                 x:Name="TimeLineView"                Grid.Row="1"                Grid.Column="1"                ScheduleView="TimelineView"                 HeaderHeight="0"                ViewHeaderHeight="0"                TimeInterval="60"                Background="White"                ShowResourceView="False"                EnableNavigation="False"                ResourceViewHeight="50"                ResourceViewMode="Absolute"                TimeIntervalHeight="150"                AllowAppointmentDrag="True"                AppointmentMapping="{StaticResource AppointmentMapping}"                AppointmentTemplate="{StaticResource DayViewAppointments}"                CellTapped="Schedule_OnCellTapped"                CellLongPressed="Schedule_OnCellLongPressed"            >                                <schedule:SfSchedule.TimelineViewSettings>                    <schedule:TimelineViewSettings AppointmentHeight="200"/>                </schedule:SfSchedule.TimelineViewSettings>                                <schedule:SfSchedule.ResourceItemTemplate>                     <DataTemplate>                         <Grid >                             <Grid.RowDefinitions>                                 <RowDefinition Height="*"/>                             </Grid.RowDefinitions>                             <Grid.ColumnDefinitions>                                 <ColumnDefinition Width="*"/>                             </Grid.ColumnDefinitions>                             <Label Text="{Binding Name}" Margin="-100,-0,-100,0" FontSize="Micro" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Rotation="-90"/>                         </Grid>                     </DataTemplate>                </schedule:SfSchedule.ResourceItemTemplate>                            </schedule:SfSchedule>                        <Frame                 Grid.Row="0"                Grid.Column="2"                CornerRadius="2"                BorderColor="Silver"                BackgroundColor="WhiteSmoke"                HasShadow="False"                Margin="0"                Padding="2"                >                <Frame.GestureRecognizers>                    <TapGestureRecognizer Tapped="LookupsType_Tapped" />                </Frame.GestureRecognizers>                <Label                     x:Name="LookupType"                     HorizontalOptions="Fill"                     VerticalOptions="Fill"                     VerticalTextAlignment="Center"                     HorizontalTextAlignment="Center"                    FontSize="Micro"/>            </Frame>                        <ListView                 x:Name="Lookups"                 Grid.Row="1"                Grid.Column="2"                 HasUnevenRows="True"                 ItemTapped="Lookups_OnItemTapped">                <ListView.ItemTemplate>                    <DataTemplate>                        <ViewCell>                            <Frame BorderColor="Silver" CornerRadius="2" HasShadow="False" VerticalOptions="FillAndExpand" BackgroundColor="{Binding Colour}" Margin="0,0,2,2">                                <Grid VerticalOptions="FillAndExpand">                                    <Grid.RowDefinitions>                                        <RowDefinition Height="Auto"/>                                        <RowDefinition Height="Auto"/>                                    </Grid.RowDefinitions>                                    <Label Text="{Binding Number}" Grid.Row="0" VerticalOptions="FillAndExpand" HorizontalTextAlignment="Center" FontSize="Micro"/>                                    <Label Text="{Binding Name}" Grid.Row="1" VerticalOptions="FillAndExpand" HorizontalTextAlignment="Center" FontSize="Micro"/>                                </Grid>                            </Frame>                        </ViewCell>                    </DataTemplate>                </ListView.ItemTemplate>            </ListView>                    </Grid>    </ContentPage.Content></ContentPage>
 |