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.
Unfortunately, activation email could not send to your email. Please try again.

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

Thread ID:

Created:

Updated:

Platform:

Replies:

127843 Dec 13,2016 03:40 AM Dec 14,2016 08:40 AM Windows Forms 1
loading
Tags: ScheduleControl
Felix Bagur
Asked On December 13, 2016 03:40 AM

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.
Fèlix

Attachment: VB_b1ada577.zip

Mohanraj Gunasekaran [Syncfusion]
Replied On December 14, 2016 08:40 AM

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, 

Codesnippet 
AddHandler Me.scheduleControl1.SetupContextMenu, AddressOf scheduleControl1_SetupContextMenu 
 
Private Sub scheduleControl1_SetupContextMenu(ByVal sender As Object, ByVal e As CancelEventArgs) 
   Me.ApplyVisualStyle() 
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 

Regards, 
Mohanraj G. 


CONFIRMATION

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.

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.

;