MonthSettings Agenda View

With MonthViewSettings.ShowAgendaView = true, is there a way to modify the visual appearance of the appointments that appear beneath the calendar when a date is selected? Similar to what I can achieve by settingAppointmentTemplate?

1 Reply 1 reply marked as answer

KA Karthikraja Arumugam Syncfusion Team December 11, 2020 02:49 PM UTC

Hi Don Hauri, 
 
Thank you for contacting Syncfusion support. 
 
We would like to inform you that your requirement of customizing AgendaView appointment template can be achieved by customizing default styles of MonthAgendaView, which is ItemsControl. 
 
 Please refer the following code example for the same, 
 <Window.Resources> 
        <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"/> 
                    </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> 
 
 <syncfusion:SfScheduler x:Name="Scheduler" ViewType="Month"> 
       <syncfusion:SfScheduler.MonthViewSettings> 
             <syncfusion:MonthViewSettings ShowAgendaView="True"/> 
       </syncfusion:SfScheduler.MonthViewSettings> 
 </syncfusion:SfScheduler> 
 
We have also prepared a sample for the same. In this sample, default ItemTemplate is changed. 
Sample link: AgendaViewSample 
 
We hope this helps. Please let us know if you have any concern. 
 
Regards, 
Karthik Raja A 


Marked as answer
Loader.
Up arrow icon