How to show tooltip for appointment in WPF Scheduler (Calendar)?
You can show Tooltip for appointment view by using the AppointmentTemplate property of ViewSettingsBase in WPF Scheduler.
XAML
You can customize the appointment view for Week, WorkWeek and Day view with Tooltip by using the AppointmentTemplate property of DaysViewSettings. For timeline and month view use the AppointmentTemplate property of TimeLineViewSettings and MonthViewSettings.
<Window.DataContext> <local:SchedulerViewModel /> </Window.DataContext> <Window.Resources> <DataTemplate x:Key="dayAppointmentTemplate"> <Grid Background="{Binding AppointmentBackground}"> <TextBlock Margin="5,5,0,0" HorizontalAlignment="Stretch" Text="{Binding Subject}" TextTrimming="CharacterEllipsis" TextWrapping="Wrap" /> <Grid.ToolTip> <ToolTip> <Grid Background="WhiteSmoke" Height="90" Width="150"> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition /> </Grid.RowDefinitions> <Border Grid.Row="0" Background="#63707e"> <TextBlock FontSize="12" Text="{Binding Subject}" Grid.Row="0" Foreground="WhiteSmoke"/> </Border> <TextBlock FontSize="14" FontWeight="Bold" FontStyle="Italic" Text="Location: " Background="#93b5b3" Foreground="White" Grid.Row="1"/> <TextBlock FontSize="14" Text="{Binding Location}" Grid.Row="2" Background="#c8dad3" Foreground="White"/> </Grid> </ToolTip> </Grid.ToolTip> </Grid> </DataTemplate> </Window.Resources> <Grid> <syncfusion:SfScheduler x:Name="schedule" Grid.Row="1" ViewType="week" ItemsSource="{Binding AppointmentCollection}"> <syncfusion:SfScheduler.DaysViewSettings> <syncfusion:DaysViewSettings AppointmentTemplate="{StaticResource dayAppointmentTemplate}"/> </syncfusion:SfScheduler.DaysViewSettings> <syncfusion:SfScheduler.TimelineViewSettings> <syncfusion:TimelineViewSettings AppointmentTemplate="{StaticResource dayAppointmentTemplate}"/> </syncfusion:SfScheduler.TimelineViewSettings> <syncfusion:SfScheduler.MonthViewSettings> <syncfusion:MonthViewSettings AppointmentTemplate="{StaticResource dayAppointmentTemplate}"/> </syncfusion:SfScheduler.MonthViewSettings> </syncfusion:SfScheduler> </Grid> </Window>
Hope you enjoyed learning about how to show tooltip for appointments in WPF Scheduler (Calendar).
You can refer to our WPF Scheduler feature tour page to learn about its other groundbreaking feature representations. You can explore our WPF Scheduler documentation to understand how to present and manipulate data.
For current customers, you can check out our Angular 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 Angular Diagram and other Angular components.
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!