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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Changes in the appearance of the control are lost when changing view

Thread ID:





127843 Dec 13,2016 08:40 AM UTC Dec 14,2016 01:40 PM UTC WinForms 1
Tags: ScheduleControl
Felix Bagur
Asked On December 13, 2016 08:40 AM UTC

I have changed the appearance of the calendar using the properties of the ScheduleControl.Appearance. When I change the view of the calendar to days the appearance returns to the original state and the changes are lost.

 Private Sub FrmScheduler_Load(sender As Object, e As EventArgs) Handles Me.Load
        Me.ScheduleControl1.Appearance.AllDayBackColor = ColorTranslator.FromHtml(lightGreen)
        Me.ScheduleControl1.Appearance.WorkWeekHeaderBackColor = ColorTranslator.FromHtml(lightGreen)
        Me.ScheduleControl1.Appearance.TodayBackColor = ColorTranslator.FromHtml(darkGreen)
        Me.ScheduleControl1.Appearance.MoreItemArrowBorderColor = ColorTranslator.FromHtml(darkGreen)
        Me.ScheduleControl1.Appearance.NavigationCalendarHeaderColor = ColorTranslator.FromHtml(darkGreen)
        Me.ScheduleControl1.Appearance.NavigationCalendarTodayBackColor = ColorTranslator.FromHtml(darkGreen)
        Me.ScheduleControl1.Appearance.NavigationCalendarSelectionColor = ColorTranslator.FromHtml(softGreen)
    End Sub

What am I doing wrong? Thank you.

Attachment: VB_b1ada577.zip

Mohanraj Gunasekaran [Syncfusion]
Replied On December 14, 2016 01:40 PM UTC

Hi Felix, 

Thanks for using Syncfusion products. 

As per the ScheduleControl architecture, the appearance styles will be reset to its default, when the schedule views have been changed dynamically. Moreover, the reported scenario can be achieved by handling the SetupContextMenu event. Please refer the following code snippet and refer the attached sample, 

AddHandler Me.scheduleControl1.SetupContextMenu, AddressOf scheduleControl1_SetupContextMenu 
Private Sub scheduleControl1_SetupContextMenu(ByVal sender As Object, ByVal e As CancelEventArgs) 
End Sub 
Private Sub ApplyVisualStyle() 
    Me.scheduleControl1.Appearance.AllDayBackColor = Color.SaddleBrown 
    Me.scheduleControl1.Appearance.WorkWeekHeaderBackColor = Color.Red 
    Me.scheduleControl1.Appearance.TodayBackColor = Color.Yellow 
    Me.scheduleControl1.Appearance.NavigationCalendarBackColor = Color.Violet 
    Me.scheduleControl1.Appearance.NavigationCalendarTodayBackColor = Color.YellowGreen 
    Me.scheduleControl1.Appearance.NavigationCalendarSelectionColor = Color.Thistle 
End Sub 
Sample link: ScheduleControl 

Mohanraj G. 


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