Articles in this section
Category / Section

How to show tooltip for appointments in WPF Scheduler (Calendar)?

4 mins read

In the Syncfusion WPF Scheduler, you can show tooltip for appointments or events by following these steps:

Step 1: Initialize the Scheduler control and assign the appointment or event collection to the ItemsSource property to populate the scheduler with data, as mentioned in the User Guide documentation.

<scheduler:SfScheduler x:Name="scheduler" 
                       ItemsSource="{Binding Appointments}"> 
</scheduler:SfScheduler> 

Step 2: Show the default tooltip for appointments or events by setting the EnableToolTip property of WPF Scheduler to true.

<scheduler:SfScheduler x:Name="scheduler" 
                       ItemsSource="{Binding Appointments}"
                       EnableToolTip="True" >
</scheduler:SfScheduler> 

Customize the appearance of the tooltip in WPF Scheduler

You can customize the tooltip appearance by using the ToolTipTemplate property in the SfScheduler.

<scheduler:SfScheduler x:Name="scheduler"
                       ItemsSource="{Binding Appointments}"
                       EnableToolTip="True">
   <scheduler:SfScheduler.ToolTipTemplate>
       <DataTemplate>
           <Border CornerRadius="4">
               <Grid>
                   <Grid.ColumnDefinitions>
                       <ColumnDefinition Width="Auto" />
                       <ColumnDefinition Width="*" />
                   </Grid.ColumnDefinitions>
                   <Rectangle Fill="{Binding AppointmentBackground}"
                              Grid.Column="0"
                              VerticalAlignment="Stretch"
                              HorizontalAlignment="Left"
                              Width="10"
                              Margin="0,0,5,0" />
                   <StackPanel Grid.Column="1"
                               Orientation="Vertical">
                       <TextBlock Text="{Binding Subject}"
                                  TextWrapping="Wrap"
                                  FontWeight="Medium"
                                  FontSize="12"
                                  Foreground="White"
                                  TextTrimming="CharacterEllipsis"
                                  Margin="0,0,0,5" />
                       <StackPanel Orientation="Horizontal">
                           <TextBlock Text="Start Time: " Margin="0,0,2,0"
                                      FontWeight="Medium"
                                      FontSize="12"
                                      Foreground="White" />
                           <TextBlock Text="{Binding StartTime}"
                                      FontSize="12"
                                      Foreground="White" />
                       </StackPanel>
                       <StackPanel Orientation="Horizontal">
                           <TextBlock Text="End Time: " Margin="0,0,2,0"
                                      FontWeight="Medium"
                                      FontSize="12"
                                      Foreground="White" />
                           <TextBlock Text="{Binding EndTime}"
                                      FontSize="12"
                                      Foreground="White" />
                       </StackPanel>
                   </StackPanel>
               </Grid>
           </Border>
       </DataTemplate>
   </scheduler:SfScheduler.ToolTipTemplate>
</scheduler:SfScheduler> 

WPFSchedulerDemo.gif

View the sample in the GitHub

Conclusion:

I hope you enjoyed learning how to show tooltip for appointments or events in WPF Scheduler control.

You can refer to our WPF Scheduler control feature tour 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 WPF 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!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied