When left at its default value (Default), the actual value of the ViewStyle property resolves to 'Standard'.
Imports Infragistics.Win Imports Infragistics.Win.UltraWinSchedule Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click ' Toggle the value of the ultraCalendarLook component's ' ViewStyle property If Me.UltraCalendarLook1.ViewStyle = ViewStyle.Standard Then Me.UltraCalendarLook1.ViewStyle = ViewStyle.Office2003 Else Me.UltraCalendarLook1.ViewStyle = ViewStyle.Standard End If ' Iterate through all the controls on this form, and if the ' control derives from UltraScheduleControlBase, set its ' CalendarLook property to the instance on which we just set the ' ViewStyle property. Dim control As Control For Each control In Me.Controls Try Dim ultraScheduleControl As UltraScheduleControlBase = CType(control, UltraScheduleControlBase) If Not ultraScheduleControl Is Nothing Then ' Only set the CalendarLook property if it is not already set If Not ultraScheduleControl.CalendarLook Is Me.UltraCalendarLook1 Then ultraScheduleControl.CalendarLook = Me.UltraCalendarLook1 End If End If Catch End Try Next End Sub
using Infragistics.Win; using Infragistics.Win.UltraWinSchedule; private void button1_Click(object sender, System.EventArgs e) { // Toggle the value of the ultraCalendarLook component's // ViewStyle property if ( this.ultraCalendarLook1.ViewStyle == ViewStyle.Standard ) this.ultraCalendarLook1.ViewStyle = ViewStyle.Office2003; else this.ultraCalendarLook1.ViewStyle = ViewStyle.Standard; // Iterate through all the controls on this form, and if the // control derives from UltraScheduleControlBase, set its // CalendarLook property to the instance on which we just set the // ViewStyle property. foreach( Control control in this.Controls ) { UltraScheduleControlBase ultraScheduleControl = control as UltraScheduleControlBase; if ( ultraScheduleControl != null ) { // Only set the CalendarLook property if it is not already set if ( ultraScheduleControl.CalendarLook != this.ultraCalendarLook1 ) ultraScheduleControl.CalendarLook = this.ultraCalendarLook1; } } }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2