Category / Section
How to display a particular day and time in day view of WinUI Scheduler (Calendar)
1 min read
Configure the day view as per the requirements in the WinUI SfScheduler.
XAML
Avoid the vertical scrolling by setting the StartHour and the EndHour properties of the DayViewSettings. By setting the TimeIntervalSize to -1, view the scheduler in full screen.
<scheduler:SfScheduler x:Name="scheduler" ViewType="Day"> <scheduler:SfScheduler.DaysViewSettings> <scheduler:DaysViewSettings StartHour="11" EndHour="20" TimeIntervalSize="-1"> </scheduler:DaysViewSettings> </scheduler:SfScheduler.DaysViewSettings> </scheduler:SfScheduler>
C#
Disable the navigation by setting the MinimumDate and the MaximumDate properties of the schedule. By setting the DisplayDate property in the schedule, move to the specific date in the schedule.
public sealed partial class MainPage : Page { public MainPage() { this.InitializeComponent(); this.scheduler.DisplayDate = DateTime.Now.Date.AddHours(11); this.scheduler.MinimumDate = DateTime.Now.Date; this.scheduler.MaximumDate = DateTime.Now.Date; } }