Articles in this section
Category / Section

How to display a particular day and time in day view of Xamarin.Forms Schedule (SfSchedule)

1 min read

You can configure the day view as per your requirements in Xamarin.Forms SfSchedule.

XAML

You can disable the navigation by setting the EnableNavigation property of the schedule and avoid the vertical scrolling by setting the StartHour and EndHour properties of DayViewSettings.  By setting TimeIntervalHeight to -1, you can view the scheduler in full screen.

<schedule:SfSchedule x:Name="Schedule"
                    DataSource="{Binding Meetings}"
                    ScheduleView="DayView"
                    EnableNavigation="False"
                    TimeIntervalHeight="-1"
                    Margin="0">
    <schedule:SfSchedule.DayViewSettings>
        <schedule:DayViewSettings StartHour="11" EndHour="20"/>
    </schedule:SfSchedule.DayViewSettings>
    <schedule:SfSchedule.AppointmentMapping>
        <schedule:ScheduleAppointmentMapping
                        ColorMapping="Color"
                        EndTimeMapping="To"
                        StartTimeMapping="From"
                        SubjectMapping="EventName"
                        />
    </schedule:SfSchedule.AppointmentMapping>
 
    <schedule:SfSchedule.BindingContext>
        <local:SchedulerViewModel/>
    </schedule:SfSchedule.BindingContext>
</schedule:SfSchedule>

C#

By setting MoveToDate in the schedule, you can move to the specific date in schedule.

  this.schedule.MoveToDate = DateTime.Now.Date.AddHours(11);

View Sample in GitHub

custom day view

 

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