2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
AgendaView height customization based on SfSchedule heightThe SfSchedule allows you to customize AgendaView height in runtime. This article explains how to customize the AgendaView height based on schedule height and device orientation in runtime.
Step 1: Initialize an event handler for the SizeChanged event of SfSchedule. schedule.SizeChanged += OnScheduleSizeChanged;
Step 2: In the SizeChanged event handler, get SfSchedule height and based on SfSchedule height and orientation, calculate height for AgendaView and assign it to the AgendaViewHeight property of SfSchedule MonthViewSettings.
private void OnScheduleSizeChanged(object sender, EventArgs e) { var scheduler = sender as SfSchedule; if(scheduler.Width > scheduler.Height && Device.RuntimePlatform != Device.UWP) { schedule.MonthViewSettings.AgendaViewHeight = schedule.Height * 0.3; } else { schedule.MonthViewSettings.AgendaViewHeight = schedule.Height * 0.5; } }
Sample Demo: AgendaHeightCustomization
|
2X faster development
The ultimate Xamarin UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.