|
1 | 1 | <?xml version="1.0" encoding="utf-8" ?> |
2 | 2 | <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" |
3 | 3 | xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
4 | | - x:Class="AppointmentTemplate.MainPage" |
5 | 4 | BackgroundColor="{DynamicResource SecondaryColor}" |
6 | 5 | xmlns:local="clr-namespace:AppointmentTemplate" |
7 | | - xmlns:schedule="clr-namespace:Syncfusion.Maui.Scheduler;assembly=Syncfusion.Maui.Scheduler"> |
| 6 | + xmlns:schedule="clr-namespace:Syncfusion.Maui.Scheduler;assembly=Syncfusion.Maui.Scheduler" |
| 7 | + x:Class="AppointmentTemplate.MainPage"> |
8 | 8 |
|
9 | 9 | <Grid> |
10 | 10 | <Grid.RowDefinitions> |
11 | | - <RowDefinition /> |
12 | | - <RowDefinition Height="50" /> |
| 11 | + <RowDefinition/> |
| 12 | + <RowDefinition Height="50"/> |
13 | 13 | </Grid.RowDefinitions> |
14 | 14 | <Grid.Resources> |
15 | 15 | <DataTemplate x:Key="dayAppointmentTemplate"> |
16 | 16 | <Grid> |
17 | 17 | <Grid.RowDefinitions> |
18 | | - <RowDefinition Height="0.1*" /> |
19 | | - <RowDefinition Height="0.8*" /> |
20 | | - <RowDefinition Height="0.1*" /> |
| 18 | + <RowDefinition Height="0.1*"/> |
| 19 | + <RowDefinition Height="0.8*"/> |
| 20 | + <RowDefinition Height="0.1*"/> |
21 | 21 | </Grid.RowDefinitions> |
22 | | - <Grid Grid.Row="0" |
23 | | - x:DataType="local:Meeting" |
24 | | - Background="{Binding Data.Background}" |
25 | | - IsClippedToBounds="True"> |
26 | | - <Label Text="{Binding Data.EventName}" |
27 | | - VerticalOptions="Center" |
28 | | - TextColor="White" |
29 | | - LineBreakMode="WordWrap" |
30 | | - MaxLines="1" |
31 | | - FontSize="Caption" |
32 | | - FontAttributes="Bold" |
33 | | - Margin="5,5,5,0" /> |
| 22 | + <Grid Grid.Row="0" Background="{Binding Data.Background}" IsClippedToBounds="True"> |
| 23 | + <Label Text="{Binding Data.EventName}" VerticalOptions="Center" TextColor="White" LineBreakMode="WordWrap" MaxLines="1" FontSize="Caption" FontAttributes="Bold" Margin="5,5,5,0"/> |
34 | 24 | </Grid> |
35 | | - <Grid Grid.Row="1" |
36 | | - Background="{Binding Data.Background}" |
37 | | - Opacity="0.8" |
38 | | - IsClippedToBounds="True"> |
| 25 | + <Grid Grid.Row="1" Background="{Binding Data.Background}" Opacity="0.8" IsClippedToBounds="True" > |
39 | 26 | <Grid.RowDefinitions> |
40 | | - <RowDefinition Height="0.3*" /> |
41 | | - <RowDefinition Height="0.7*" /> |
| 27 | + <RowDefinition Height="0.3*"/> |
| 28 | + <RowDefinition Height="0.7*"/> |
42 | 29 | </Grid.RowDefinitions> |
43 | | - <Image Aspect="AspectFit" |
44 | | - VerticalOptions="Center" |
45 | | - Margin="0, 10, 0, 10" |
46 | | - HorizontalOptions="Center" |
47 | | - HeightRequest="{OnPlatform Android= 30, iOS=30, MacCatalyst=50}" |
48 | | - WidthRequest="{OnPlatform Android= 30, iOS=30, MacCatalyst=50}" |
49 | | - Source="{Binding Data.Location}" /> |
50 | | - <Label Text="{Binding Data.Notes}" |
51 | | - Grid.Row="1" |
52 | | - TextColor="White" |
53 | | - LineBreakMode="WordWrap" |
54 | | - Margin="3,3,3,0" |
55 | | - FontSize="10" /> |
| 30 | + <Image Aspect="AspectFit" VerticalOptions="Center" Margin="0, 10, 0, 10" HorizontalOptions="Center" HeightRequest="{OnPlatform Android= 30, iOS=30, MacCatalyst=50}" WidthRequest="{OnPlatform Android= 30, iOS=30, MacCatalyst=50}" Source="{Binding Data.Location}"/> |
| 31 | + <Label Text="{Binding Data.Notes}" Grid.Row="1" TextColor="White" LineBreakMode="WordWrap" Margin="3,3,3,0" FontSize="10" /> |
56 | 32 | </Grid> |
57 | | - <BoxView Grid.Row="2" |
58 | | - Background="{Binding Data.Background}" /> |
| 33 | + <BoxView Grid.Row="2" Background="{Binding Data.Background}"/> |
59 | 34 | </Grid> |
60 | 35 |
|
61 | 36 | </DataTemplate> |
62 | 37 |
|
63 | 38 | <DataTemplate x:Key="monthAppointmentTemplate"> |
64 | 39 | <Grid Margin="2,1"> |
65 | 40 | <Grid.ColumnDefinitions> |
66 | | - <ColumnDefinition Width="0.1*" /> |
67 | | - <ColumnDefinition Width="0.9*" /> |
| 41 | + <ColumnDefinition Width="0.1*"/> |
| 42 | + <ColumnDefinition Width="0.9*"/> |
68 | 43 | </Grid.ColumnDefinitions> |
69 | | - <Border StrokeThickness="1" |
70 | | - Stroke="{Binding Data.Background}" |
71 | | - Background="{Binding Data.Background}" |
72 | | - Padding="0" |
73 | | - Margin="0" |
74 | | - Opacity="0.8"> |
| 44 | + <Border StrokeThickness="1" Stroke="{Binding Data.Background}" Background="{Binding Data.Background}" Padding="0" Margin="0" Opacity="0.8"> |
75 | 45 | <Border.StrokeShape> |
76 | 46 | <RoundRectangle CornerRadius="5, 0, 5, 0" /> |
77 | 47 | </Border.StrokeShape> |
78 | 48 | </Border> |
79 | | - <Border Grid.Column="1" |
80 | | - Background="{Binding Data.Background}" |
81 | | - Padding="0" |
82 | | - Margin="-1, 0, 0, 0" |
83 | | - StrokeThickness="1" |
84 | | - Stroke="{Binding Data.Background}"> |
| 49 | + <Border Grid.Column="1" Background="{Binding Data.Background}" Padding="0" Margin="-1, 0, 0, 0" StrokeThickness="1" Stroke="{Binding Data.Background}"> |
85 | 50 | <Border.StrokeShape> |
86 | 51 | <RoundRectangle CornerRadius="0, 5, 0, 5" /> |
87 | 52 | </Border.StrokeShape> |
88 | | - <Label Padding="3, 0, 0, 0" |
89 | | - HorizontalTextAlignment="Start" |
90 | | - Text="{Binding Data.EventName}" |
91 | | - FontSize="10" |
92 | | - FontAttributes="Bold" |
93 | | - MaxLines="1" |
94 | | - TextColor="White" |
95 | | - LineBreakMode="WordWrap" |
96 | | - HorizontalOptions="Start" |
97 | | - VerticalOptions="Center" /> |
| 53 | + <Label Padding="3, 0, 0, 0" HorizontalTextAlignment="Start" Text="{Binding Data.EventName}" FontSize="10" FontAttributes="Bold" MaxLines="1" TextColor="White" LineBreakMode="WordWrap" HorizontalOptions="Start" VerticalOptions="Center" /> |
98 | 54 | </Border> |
99 | 55 | </Grid> |
100 | 56 | </DataTemplate> |
101 | 57 |
|
102 | 58 | <DataTemplate x:Key="timelineAppointmentTemplate"> |
103 | 59 | <Grid Margin="2,1"> |
104 | 60 | <Grid.ColumnDefinitions> |
105 | | - <ColumnDefinition Width="0.1*" /> |
106 | | - <ColumnDefinition Width="0.9*" /> |
| 61 | + <ColumnDefinition Width="0.1*"/> |
| 62 | + <ColumnDefinition Width="0.9*"/> |
107 | 63 | </Grid.ColumnDefinitions> |
108 | | - <Border StrokeThickness="1" |
109 | | - Stroke="{Binding Data.Background}" |
110 | | - Background="{Binding Data.Background}" |
111 | | - Padding="0" |
112 | | - Margin="0" |
113 | | - Opacity="0.8"> |
| 64 | + <Border StrokeThickness="1" Stroke="{Binding Data.Background}" Background="{Binding Data.Background}" Padding="0" Margin="0" Opacity="0.8"> |
114 | 65 | <Border.StrokeShape> |
115 | 66 | <RoundRectangle CornerRadius="5, 0, 5, 0" /> |
116 | 67 | </Border.StrokeShape> |
117 | 68 | </Border> |
118 | | - <Border Grid.Column="1" |
119 | | - Background="{Binding Data.Background}" |
120 | | - Padding="0" |
121 | | - Margin="-1, 0, 0, 0" |
122 | | - StrokeThickness="1" |
123 | | - Stroke="{Binding Data.Background}"> |
| 69 | + <Border Grid.Column="1" Background="{Binding Data.Background}" Padding="0" Margin="-1, 0, 0, 0" StrokeThickness="1" Stroke="{Binding Data.Background}"> |
124 | 70 | <Border.StrokeShape> |
125 | 71 | <RoundRectangle CornerRadius="0, 5, 0, 5" /> |
126 | 72 | </Border.StrokeShape> |
127 | | - <Label HorizontalTextAlignment="Center" |
128 | | - Text="{Binding Data.EventName}" |
129 | | - FontSize="10" |
130 | | - FontAttributes="Bold" |
131 | | - TextColor="White" |
132 | | - LineBreakMode="WordWrap" |
133 | | - HorizontalOptions="Center" |
134 | | - VerticalOptions="Center" /> |
| 73 | + <Label HorizontalTextAlignment="Center" Text="{Binding Data.EventName}" FontSize="10" FontAttributes="Bold" TextColor="White" LineBreakMode="WordWrap" HorizontalOptions="Center" VerticalOptions="Center" /> |
135 | 74 | </Border> |
136 | 75 | </Grid> |
137 | 76 | </DataTemplate> |
138 | 77 | </Grid.Resources> |
139 | | - <schedule:SfScheduler x:Name="Scheduler" |
140 | | - View="TimelineDay" |
141 | | - AllowedViews="Day,Week,WorkWeek,TimelineDay,TimelineWeek,TimelineWorkWeek"> |
| 78 | + <schedule:SfScheduler x:Name="Scheduler" |
| 79 | + View="TimelineDay" AllowedViews="Day,Week,WorkWeek,TimelineDay,TimelineWeek,TimelineWorkWeek"> |
142 | 80 | <schedule:SfScheduler.AppointmentMapping> |
143 | | - <schedule:SchedulerAppointmentMapping Subject="EventName" |
144 | | - StartTime="From" |
145 | | - EndTime="To" |
146 | | - Background="Background" |
147 | | - IsAllDay="IsAllDay" |
148 | | - StartTimeZone="StartTimeZone" |
149 | | - EndTimeZone="EndTimeZone" |
150 | | - RecurrenceExceptionDates="RecurrenceExceptions" |
151 | | - RecurrenceRule="RecurrenceRule" |
152 | | - RecurrenceId="RecurrenceId" /> |
| 81 | + <schedule:SchedulerAppointmentMapping |
| 82 | + Subject="EventName" |
| 83 | + StartTime="From" |
| 84 | + EndTime="To" |
| 85 | + Background="Background" |
| 86 | + IsAllDay="IsAllDay" |
| 87 | + StartTimeZone="StartTimeZone" |
| 88 | + EndTimeZone="EndTimeZone" |
| 89 | + RecurrenceExceptionDates="RecurrenceExceptions" |
| 90 | + RecurrenceRule="RecurrenceRule" |
| 91 | + RecurrenceId="RecurrenceId"/> |
153 | 92 | </schedule:SfScheduler.AppointmentMapping> |
154 | 93 | <schedule:SfScheduler.MonthView> |
155 | 94 | <schedule:SchedulerMonthView AppointmentTemplate="{StaticResource monthAppointmentTemplate}" |
156 | | - AppointmentDisplayMode="Text"> |
| 95 | + AppointmentDisplayMode="Text" > |
157 | 96 | </schedule:SchedulerMonthView> |
158 | 97 | </schedule:SfScheduler.MonthView> |
159 | 98 | <schedule:SfScheduler.TimelineView> |
160 | | - <schedule:SchedulerTimelineView AppointmentTemplate="{StaticResource timelineAppointmentTemplate}" /> |
| 99 | + <schedule:SchedulerTimelineView |
| 100 | + AppointmentTemplate="{StaticResource timelineAppointmentTemplate}" /> |
161 | 101 | </schedule:SfScheduler.TimelineView> |
162 | 102 | <schedule:SfScheduler.DaysView> |
163 | | - <schedule:SchedulerDaysView AppointmentTemplate="{StaticResource dayAppointmentTemplate}" /> |
| 103 | + <schedule:SchedulerDaysView |
| 104 | + AppointmentTemplate="{StaticResource dayAppointmentTemplate}"/> |
164 | 105 | </schedule:SfScheduler.DaysView> |
165 | 106 | <schedule:SfScheduler.Behaviors> |
166 | | - <local:AppearanceCustomizationBehavior /> |
| 107 | + <local:AppearanceCustomizationBehavior/> |
167 | 108 | </schedule:SfScheduler.Behaviors> |
168 | 109 | </schedule:SfScheduler> |
169 | 110 | </Grid> |
170 | | - |
171 | 111 | </ContentPage> |
0 commit comments