Hide month header buton

Hello!

How do I hide this button?

WhatsApp Image 2024-05-01 at 19.47.41.jpeg


1 Reply

VM Vidyalakshmi Mani Syncfusion Team May 2, 2024 01:36 PM UTC

Hi Leo,


Thank you for contacting us. To hide the 'Today' icon button in the header of the Scheduler, you can use the `ShowNavigationArrows` property. Set `ShowNavigationArrows="False"` in your `SfScheduler` control:


 Xaml

 

<scheduler:SfScheduler  x:Name="Scheduler"

                        View="Agenda"

                        AllowedViews="Day,Week,WorkWeek,Month,TimelineDay,TimelineWeek,TimelineWorkWeek,TimelineMonth,Agenda"

                        ShowNavigationArrows="False"

                        ViewChanged="Scheduler_ViewChanged">

 </scheduler:SfScheduler>

 


Then, in your code-behind, you can handle the `ViewChanged` event to toggle the `ShowNavigationArrows` property based on the view:


 C#

 

private void Scheduler_ViewChanged(object sender, Syncfusion.Maui.Scheduler.SchedulerViewChangedEventArgs e)

{

    if (e.NewView == Syncfusion.Maui.Scheduler.SchedulerView.Agenda)

    {

        this.Scheduler.ShowNavigationArrows = false;

    }

    else

    {

        this.Scheduler.ShowNavigationArrows = true;

    }

}

 


This code will hide the 'Today' icon button when the Scheduler is in the Agenda view, and show it for other views. If you want to hide the 'Today' button in other views as well, you can set `ShowNavigationArrows="False"` directly in the XAML without handling the `ViewChanged` event. We have prepared a simple sample demonstrating this functionality. Please see the attached sample for your reference.


For more details, you can also refer to our User Guide document : Show-navigation-arrow


We hope that this helps you. Please let us know if you need any further assistance.


Regards,

Vidyalakshmi M.



Attachment: GettingStarted_5db476ff.zip

Loader.
Up arrow icon