Set the color of the expand button and the more button

I would like to set the color of the expand button () and the more button (+5) :

sf_scheduler_dark_theme.png


3 Replies

VM Vidyalakshmi Mani Syncfusion Team October 11, 2024 02:10 PM UTC

Hi Fabrice, 


Thank you for contacting us! You can customize the color of expand button and the more appointments button in the all-day appointments panel using the theme key " SfSchedulerNormalMoreAppointmentIndicatorColor." Here’s a code snippet to illustrate:


App.xaml.cs:


   

<Application.Resources>

        <ResourceDictionary>

            <ResourceDictionary.MergedDictionaries>

                <syncTheme:SyncfusionThemeResourceDictionary VisualTheme="MaterialDark" />

                <ResourceDictionary>

                    <x:String x:Key="SfSchedulerTheme">CommonTheme</x:String>

                    <Color x:Key="SfSchedulerNormalMoreAppointmentIndicatorColor">Lime</Color>

                </ResourceDictionary>

                <ResourceDictionary Source="Resources/Styles/Colors.xaml" />

                <ResourceDictionary Source="Resources/Styles/Styles.xaml" />

            </ResourceDictionary.MergedDictionaries>

        </ResourceDictionary>

    </Application.Resources>

</Application>

 



We have also prepared a simple sample that demonstrates this customization for your reference.


If you have any further questions or need assistance, please don’t hesitate to reach out.


Regards,

Vidyalakshmi M.



Attachment: MauiApp1_e0d4821e.zip


FA Fabrice October 12, 2024 12:10 PM UTC

Thanks Vidyalakshmi M,

For those interested, I slightly adapted your code to my needs:


  SetThemeColors();

  RequestedThemeChanged += (s, e) => SetThemeColors();


  private void SetThemeColors()

  {

      Resources["SfSchedulerNormalMoreAppointmentIndicatorColor"] = RequestedTheme switch

      {

          AppTheme.Dark => Colors.White,

          _ => Colors.Black

      };

  }




VM Vidyalakshmi Mani Syncfusion Team October 14, 2024 04:05 PM UTC

Hi Fabrice,


We are glad that your issue has been resolved! Please let us know if you need further assistance. As always, we are happy to help you out.


Regards,

Vidyalakshmi M.


Loader.
Up arrow icon