Skip to content

Commit a5b6cfd

Browse files
committed
Added images and proper example codes
1 parent d042e21 commit a5b6cfd

10 files changed

+127
-29
lines changed
376 KB
Loading
450 KB
Loading
102 KB
Loading
82.8 KB
Loading
82.3 KB
Loading
95.5 KB
Loading
26.3 KB
Loading

MAUI/Scheduler/month-view.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ The scheduler month view allows you to customize the appointment indicator rende
119119
<schedule:SfScheduler x:Name="Scheduler"
120120
View="Month" >
121121
<schedule:SfScheduler.MonthView>
122-
<schedule:SchedulerMonthView AppointmentDisplayMode="Indicator" AppointmentIndicatorRenderMode="FillAndStroke"/>
122+
<schedule:SchedulerMonthView AppointmentDisplayMode="Indicator" AppointmentIndicatorSize="15" AppointmentIndicatorCount="2" AppointmentIndicatorRenderMode="Stroke"/>
123123
</schedule:SfScheduler.MonthView>
124124
</schedule:SfScheduler>
125125

@@ -128,11 +128,15 @@ The scheduler month view allows you to customize the appointment indicator rende
128128

129129
this.Scheduler.View = SchedulerView.Month;
130130
this.Scheduler.MonthView.AppointmentDisplayMode = SchedulerMonthAppointmentDisplayMode.Indicator;
131-
this.Scheduler.MonthView.AppointmentIndicatorRenderMode = AppointmentIndicatorRenderMode.FillAndStroke;
131+
this.Scheduler.MonthView.AppointmentIndicatorRenderMode = AppointmentIndicatorRenderMode.Stroke;
132+
this.Scheduler.MonthView.AppointmentIndicatorSize = 15;
133+
this.Scheduler.MonthView.AppointmentIndicatorCount = 2;
132134

133135
{% endhighlight %}
134136
{% endtabs %}
135137

138+
![appointment-renderer-mode-stroke-maui-scheduler](images/month-view/appointment-renderer-mode-stroke-maui-scheduler.png){:width="325" height="600" loading="lazy" .lazy .shadow-effect .section-padding .img-padding}
139+
136140
## Appointment indicator stroke thickness
137141

138142
The scheduler month view allows you to customize the appointment indicator stroke thickness by using the `AppointmentIndicatorStrokeThickness` property of the [MonthView](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerMonthView.html). By default, the `AppointmentIndicatorStrokeThickness` is set to 1d.
@@ -143,7 +147,7 @@ The scheduler month view allows you to customize the appointment indicator strok
143147
<schedule:SfScheduler x:Name="Scheduler"
144148
View="Month" >
145149
<schedule:SfScheduler.MonthView>
146-
<schedule:SchedulerMonthView AppointmentDisplayMode="Indicator" AppointmentIndicatorSize="20" AppointmentIndicatorRenderMode="FillAndStroke" AppointmentIndicatorStrokeThickness="4"/>
150+
<schedule:SchedulerMonthView AppointmentDisplayMode="Indicator" AppointmentIndicatorSize="20" AppointmentIndicatorRenderMode="Stroke" AppointmentIndicatorStrokeThickness="4"/>
147151
</schedule:SfScheduler.MonthView>
148152
</schedule:SfScheduler>
149153

@@ -152,13 +156,15 @@ The scheduler month view allows you to customize the appointment indicator strok
152156

153157
this.Scheduler.View = SchedulerView.Month;
154158
this.Scheduler.MonthView.AppointmentDisplayMode = SchedulerMonthAppointmentDisplayMode.Indicator;
155-
this.Scheduler.MonthView.AppointmentIndicatorRenderMode = AppointmentIndicatorRenderMode.FillAndStroke;
159+
this.Scheduler.MonthView.AppointmentIndicatorRenderMode = AppointmentIndicatorRenderMode.Stroke;
156160
this.Scheduler.MonthView.AppointmentIndicatorSize = 20;
157161
this.Scheduler.MonthView.AppointmentIndicatorStrokeThickness = 4;
158162

159163
{% endhighlight %}
160164
{% endtabs %}
161165

166+
![appointment-indicator-stroke-thickness-maui-scheduler](images/month-view/appointment-indicator-stroke-thickness-maui-scheduler.png){:width="325" height="600" loading="lazy" .lazy .shadow-effect .section-padding .img-padding}
167+
162168
## Hide leading and trailing dates
163169

164170
The previous and next month dates from a Scheduler month view can be hidden by using the [ShowLeadingAndTrailingDates](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerMonthView.html#Syncfusion_Maui_Scheduler_SchedulerMonthView_ShowLeadingAndTrailingDates) property in the [MonthView](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerMonthView.html). The `ShowLeadingAndTrailingDates` property defaults to `true.`

MAUI/Scheduler/resource-view.md

Lines changed: 113 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -176,86 +176,126 @@ this.Scheduler.ResourceView.ResourceGroupType = SchedulerResourceGroupType.Date;
176176

177177
In Mobile platforms, the resource view for the day, week, and work week view where grouped under an adaptive header.
178178

179+
N> The adaptive header display of resources in the **Day**, **Week**, and **Work Week** views is supported only on .NET MAUI mobile platforms (**Android** and **iOS**).
180+
179181
### Customize hamburger icon color
180182

181183
The hamburger icon color can be customized by using the `HamburgerIconColor` property of the [SchedulerResourceView](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html?tabs=tabid-13%2Ctabid-6).
182184

183185
{% tabs %}
184186
{% highlight XAML hl_lines="4" %}
185187

186-
<syncfusion:SfScheduler x:Name="Scheduler">
188+
<syncfusion:SfScheduler x:Name="Scheduler" View="Day">
187189
<syncfusion:SfScheduler.ResourceView>
188-
<syncfusion:SchedulerResourceView HamburgerIconColor="Black" />
190+
<syncfusion:SchedulerResourceView HamburgerIconColor="Red" />
189191
</syncfusion:SfScheduler.ResourceView>
190192
</syncfusion:SfScheduler>
191193

192194
{% endhighlight %}
193-
{% highlight C# hl_lines="2" %}
195+
{% highlight C# hl_lines="9" %}
196+
var Resources = new ObservableCollection<SchedulerResource>()
197+
{
198+
new SchedulerResource() { Name = "Sophia", Id = "1000" },
199+
new SchedulerResource() { Name = "Zoey Addison", Id = "1001" },
200+
new SchedulerResource() { Name = "James William", Id = "1002" },
201+
};
194202

195-
this.Scheduler.ResourceView.HamburgerIconColor = Colors.Black;
203+
this.Scheduler.ResourceView.Resources = Resources;
204+
this.Scheduler.ResourceView.HamburgerIconColor = Colors.Red;
196205

197206
{% endhighlight %}
198207
{% endtabs %}
199208

209+
![customize-hamburger-icon-color-in-maui-scheduler](images/resource-view/customize-hamburger-icon-color-in-maui-scheduler.png)
210+
200211
### Customize drawer resource selection color
201212

202213
The drawer resource selection color can be customized by using the `DrawerResourceSelectionColor` property of the [SchedulerResourceView](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html?tabs=tabid-13%2Ctabid-6).
203214

204215
{% tabs %}
205216
{% highlight XAML hl_lines="4" %}
206217

207-
<syncfusion:SfScheduler x:Name="Scheduler">
218+
<syncfusion:SfScheduler x:Name="Scheduler" View="Day">
208219
<syncfusion:SfScheduler.ResourceView>
209220
<syncfusion:SchedulerResourceView DrawerResourceSelectionColor="DodgerBlue" />
210221
</syncfusion:SfScheduler.ResourceView>
211222
</syncfusion:SfScheduler>
212223

213224
{% endhighlight %}
214-
{% highlight C# hl_lines="2" %}
225+
{% highlight C# hl_lines="9" %}
226+
var Resources = new ObservableCollection<SchedulerResource>()
227+
{
228+
new SchedulerResource() { Name = "Sophia", Id = "1000" },
229+
new SchedulerResource() { Name = "Zoey Addison", Id = "1001" },
230+
new SchedulerResource() { Name = "James William", Id = "1002" },
231+
};
215232

233+
this.Scheduler.ResourceView.Resources = Resources;
216234
this.Scheduler.ResourceView.DrawerResourceSelectionColor = Brush.DodgerBlue;
217235

218236
{% endhighlight %}
219237
{% endtabs %}
220238

239+
![customize-drawer-resource-selection-color-in-maui-scheduler](images/resource-view/customize-drawer-resource-selection-color-in-maui-scheduler.png)
240+
221241
### Customize drawer background
222242

223243
The drawer background can be customized by using the `DrawerBackground` property of the [SchedulerResourceView](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html?tabs=tabid-13%2Ctabid-6).
224244

225245
{% tabs %}
226246
{% highlight XAML hl_lines="4" %}
227247

228-
<syncfusion:SfScheduler x:Name="Scheduler">
248+
<syncfusion:SfScheduler x:Name="Scheduler" View="Day">
229249
<syncfusion:SfScheduler.ResourceView>
230-
<syncfusion:SchedulerResourceView DrawerBackground="Red" />
250+
<syncfusion:SchedulerResourceView DrawerBackground="LightGoldenrodYellow" />
231251
</syncfusion:SfScheduler.ResourceView>
232252
</syncfusion:SfScheduler>
233253

234254
{% endhighlight %}
235-
{% highlight C# hl_lines="2" %}
255+
{% highlight C# hl_lines="9" %}
256+
var Resources = new ObservableCollection<SchedulerResource>()
257+
{
258+
new SchedulerResource() { Name = "Sophia", Id = "1000" },
259+
new SchedulerResource() { Name = "Zoey Addison", Id = "1001" },
260+
new SchedulerResource() { Name = "James William", Id = "1002" },
261+
};
236262

237-
this.Scheduler.ResourceView.DrawerBackground = Brush.Red;
263+
this.Scheduler.ResourceView.Resources = Resources;
264+
this.Scheduler.ResourceView.DrawerBackground = Brush.LightGoldenrodYellow;
238265

239266
{% endhighlight %}
240267
{% endtabs %}
241268

269+
![customize-drawer-background-in-maui-scheduler](images/resource-view/customize-drawer-background-in-maui-scheduler.png)
270+
242271
### Customize adaptive header appearance using DataTemplate
243272

244273
The adaptive header appearance customization can be achieved by using the `AdaptiveHeaderTemplate` property of [SchedulerResourceView](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html?tabs=tabid-13%2Ctabid-6) in the [SfScheduler](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SfScheduler.html).
245274

246275
{% tabs %}
247-
{% highlight xaml tabtitle="MainPage.xaml" hl_lines="5 6 7 8 9 10 11 12 13 14 15" %}
276+
{% highlight xaml tabtitle="MainPage.xaml" %}
248277

249-
<schedule:SfScheduler x:Name="Scheduler">
278+
<schedule:SfScheduler x:Name="Scheduler" View="Day">
250279
<schedule:SfScheduler.ResourceView>
251280
<schedule:SchedulerResourceView>
252281
<schedule:SchedulerResourceView.AdaptiveHeaderTemplate>
253282
<DataTemplate>
254-
<Grid Padding="8">
283+
<Grid Padding="8" BackgroundColor="PaleGreen">
255284
<HorizontalStackLayout Spacing="8" VerticalOptions="Center">
256-
<Label Text="{Binding Name}"
257-
FontAttributes="Bold"
258-
FontSize="14" />
285+
<Label Text="☰"
286+
FontSize="16"
287+
VerticalTextAlignment="Center"
288+
HorizontalTextAlignment="Center"
289+
TextColor="Red"
290+
Margin="0,0,12,0">
291+
<Label.GestureRecognizers>
292+
<TapGestureRecognizer Tapped="OnTapped" />
293+
</Label.GestureRecognizers>
294+
</Label>
295+
<Label Text="{Binding Resource.Name}"
296+
FontAttributes="Bold"
297+
FontSize="14"
298+
TextColor="DarkViolet" />
259299
</HorizontalStackLayout>
260300
</Grid>
261301
</DataTemplate>
@@ -267,25 +307,73 @@ The adaptive header appearance customization can be achieved by using the `Adapt
267307
{% endhighlight %}
268308
{% highlight c# tabtitle="MainPage.xaml.cs" %}
269309

270-
this.Scheduler.ResourceView.AdaptiveHeaderTemplate = new DataTemplate(() =>
271-
{
272-
var nameLabel = new Label
310+
var Resources = new ObservableCollection<SchedulerResource>()
311+
{
312+
new SchedulerResource() { Name = "Sophia", Id = "1000" },
313+
new SchedulerResource() { Name = "Zoey Addison", Id = "1001" },
314+
new SchedulerResource() { Name = "James William", Id = "1002" },
315+
};
316+
317+
this.Scheduler.ResourceView.Resources = Resources;
318+
this.Scheduler.ResourceView.AdaptiveHeaderTemplate = new DataTemplate(() =>
319+
{
320+
var grid = new Grid
273321
{
274-
FontAttributes = FontAttributes.Bold,
275-
FontSize = 14,
322+
Padding = 8,
323+
BackgroundColor = Colors.PaleGreen
324+
};
325+
326+
var stack = new HorizontalStackLayout
327+
{
328+
Spacing = 8,
276329
VerticalOptions = LayoutOptions.Center
277330
};
278-
nameLabel.SetBinding(Label.TextProperty, "Name");
279331

280-
var row = new HorizontalStackLayout { Spacing = 8, VerticalOptions = LayoutOptions.Center };
281-
row.Children.Add(nameLabel);
332+
var menuLabel = new Label
333+
{
334+
Text = "☰",
335+
FontSize = 16,
336+
TextColor = Colors.Red,
337+
VerticalTextAlignment = TextAlignment.Center,
338+
HorizontalTextAlignment = TextAlignment.Center,
339+
Margin = new Thickness(0, 0, 12, 0)
340+
};
282341

283-
return new Grid { Padding = 8, Children = { row } };
342+
var tap = new TapGestureRecognizer();
343+
tap.Tapped += OnTapped;
344+
menuLabel.GestureRecognizers.Add(tap);
345+
var nameLabel = new Label
346+
{
347+
FontAttributes = FontAttributes.Bold,
348+
FontSize = 14,
349+
TextColor = Colors.DarkViolet
350+
};
351+
352+
nameLabel.SetBinding(Label.TextProperty, "Resource.Name");
353+
stack.Add(menuLabel);
354+
stack.Add(nameLabel);
355+
grid.Add(stack);
356+
return grid;
284357
});
285358

359+
private void OnTapped(object sender, TappedEventArgs e)
360+
{
361+
if (sender is Label label && label.BindingContext is SchedulerAdaptiveResource resource)
362+
{
363+
resource.ToggleResourceDrawerView();
364+
}
365+
}
366+
286367
{% endhighlight %}
287368
{% endtabs %}
288369

370+
![customize-adapter-header-template-in-maui-scheduler](images/resource-view/customize-adapter-header-template-in-maui-scheduler.png)
371+
372+
N>
373+
374+
* The BindingContext of the `AdaptiveHeaderTemplate` is the `SchedulerAdaptiveResource.`
375+
* The `ToggleResourceDrawerView` method should be called on the `SchedulerAdaptiveResource` instance obtained from the control’s BindingContext. It toggles the visibility of the drawer resource view. It is used only when the `AdaptiveHeaderTemplate` is applied.
376+
289377
## Visible Resource Count
290378

291379
The number of resources shown in the day, week, work week, timelineday, timelineweek, timelineworkweek views can be controlled using the [`VisibleResourceCount`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_VisibleResourceCount) property of the [`SchedulerResourceView`](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerResourceView.html#Syncfusion_Maui_Scheduler_SchedulerResourceView_Resources) class. This lets you define how many resources are visible at a time.

MAUI/Scheduler/timeline-views.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,8 @@ N> The `Timeline workweek` view displays exactly the defined working days on Sch
140140

141141
The `HideNonWorkingDays` property of the [TimelineView](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerTimelineView.html) allows you to control the visibility of non-working days in `TimelineMonth`. By default, the `HideNonWorkingDays` property is set to false.
142142

143+
N> The `HideNonWorkingDays` property will be applicable only for `TimelineMonth` view, and not be applicable for the remaining views.
144+
143145
{% tabs %}
144146
{% highlight XAML hl_lines="6" %}
145147

@@ -163,6 +165,8 @@ this.Content = scheduler;
163165
{% endhighlight %}
164166
{% endtabs %}
165167

168+
![hide-non-working-days-in-timelinemonth-maui-scheduler](images/timeline-views/hide-non-working-days-in-timelinemonth-maui-scheduler.png)
169+
166170
## Flexible working hours
167171

168172
The default values for [StartHour](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerTimeSlotView.html#Syncfusion_Maui_Scheduler_SchedulerTimeSlotView_StartHour) and [EndHour](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerTimeSlotView.html#Syncfusion_Maui_Scheduler_SchedulerTimeSlotView_EndHour) are `0` and `24` respectively, to show all the time slots for a timeline day, timeline week, or timeline workweek view. You may set these properties to show only the required time periods in [TimelineView](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerTimelineView.html). You can set [StartHour](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerTimeSlotView.html#Syncfusion_Maui_Scheduler_SchedulerTimeSlotView_StartHour) and [EndHour](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Scheduler.SchedulerTimeSlotView.html#Syncfusion_Maui_Scheduler_SchedulerTimeSlotView_EndHour) in the time duration to show the required time duration in minutes.

0 commit comments

Comments
 (0)