How to customize the appointment of Month agenda view in WPF Scheduler (Calendar)?
You can customize the agenda view appointment template by customizing the default styles of MonthAgendaView, which is ItemsControl in WPF Scheduler.
XAML
Bind the appointments to a schedule by using the Scheduler.ItemsSource property. Set the appointment view as agenda view by enable the ShowAgendaView property and set the ViewType as Month.
<syncfusion:SfScheduler x:Name="Scheduler" ViewType="Month" ItemsSource="{Binding AppointmentCollection}"> <syncfusion:SfScheduler.MonthViewSettings> <syncfusion:MonthViewSettings ShowAgendaView="True"/> </syncfusion:SfScheduler.MonthViewSettings> </syncfusion:SfScheduler>
XAML
You can customize the default styles of MonthAgendaView by using the property of ItemContainerStyle and ItemTemplate.
<Window.Resources> <Style TargetType="syncfusion:AppointmentControl"> <Setter Property="TextBlock.FontSize" Value="13"/> </Style> <Style TargetType="syncfusion:MonthAgendaView"> <Setter Property="ItemContainerStyle" > <Setter.Value> <Style TargetType="ListViewItem"> <Setter Property="HorizontalContentAlignment" Value="Stretch"/> <Setter Property="VerticalContentAlignment" Value="Stretch"/> <Setter Property="Height" Value="50"/> <Setter Property="BorderThickness" Value="0"/> </Style> </Setter.Value> </Setter> <Setter Property="ItemTemplate"> <Setter.Value> <DataTemplate> <Border CornerRadius="3" BorderThickness="1" Background="{Binding AppointmentBackground}"> <TextBlock Padding="5, 5, 0, 0" HorizontalAlignment="Left" VerticalAlignment="Center" Foreground="White" Text="{Binding Subject}"/> </Border> </DataTemplate> </Setter.Value> </Setter> </Style> </Window.Resources>
Conclusion
I hope you enjoyed learning about how to customize the appointment of month agenda view in WPF Scheduler (Calendar).
You can refer to our WPF Scheduler feature page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!