We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Set background of ResourceView (NOT the items)

Thread ID:





149976 Dec 16,2019 10:45 PM UTC Jan 7,2020 11:17 AM UTC Xamarin.Forms 4
Tags: SfSchedule
Elias P
Asked On December 16, 2019 10:45 PM UTC

Is it possible to set the background color of the ResourceView in SfSchedule? (Not the items themselves - the container that holds the resources for the scheduler.)

Elias P
Replied On December 17, 2019 12:09 AM UTC

I have found the following (at least on Xamarin Forms - Android):
- Setting the Header background color shows the correct color in the previewer, but not during runtime
- To change the ResourceContainer's background color, I had to write a DependencyService that uses reflection to set the background. Relevant code below.

    public class Hack : IHack
        public void Hack(SfSchedule schedule)
            var nativeObject = typeof(SfSchedule).GetProperty("NativeObject", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(schedule);
            var androidObject = nativeObject as Com.Syncfusion.Schedule.SfSchedule;

            var resourceContainer = androidObject.GetType().GetProperty("ResourceContainer", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(androidObject) as Android.Widget.FrameLayout;



Indumathi Ravichandran [Syncfusion]
Replied On December 17, 2019 12:54 PM UTC

Hi Elias, 
Thank you for contacting Syncfusion support. 
Currently, we are analyzing your requirement of “Applying BackgroundColor for ResourceView Container” Xamarin.Forms. We will validate and update you the further details within two business days (December 19, 2019). We appreciate your patience until then. 
Indumathi R  

Karthikraja Arumugam [Syncfusion]
Replied On December 19, 2019 12:59 PM UTC

Hi Elias, 
Thank you for your patience. 
We have checked your requirement of “Changing resource view container background color”. As of now, schedule doesn’t have direct support to change resource view container color, so we have logged an issue report for the same. After this fix, you can change container background color by changing Schedule background color. We will fix this and include the issue fix in our Weekly Nuget release which is expected to roll out on January 7, 2019. We appreciate your patience until then. 
Karthik Raja A 

Karthikraja Arumugam [Syncfusion]
Replied On January 7, 2020 11:17 AM UTC

Hi Elias,                    
We have provided support to change “Resource view container background color” by changing the schedule background color and included the fix in our latest Weekly NuGet release update version which is available for download (nuget.org).

As we have already mentioned you can change resource view container color by setting schedule background color property. Please refer the following code example for the same, 
schedule.BackgroundColor = Color.Cyan; 
We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance. 
Karthik Raja A 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon