MindFusion WinForms Programmer's Guide
Calendar.ControlAppearance Property
See Also
 





Gets or sets the visual style of the calendar child controls.

Namespace: MindFusion.Scheduling.WinForms
Assembly: MindFusion.Scheduling

 Syntax

C#  Copy Code

public ControlAppearance ControlAppearance { get; set; }

Visual Basic  Copy Code

Public Property ControlAppearance As ControlAppearance

 Property Value

A member of the ControlAppearance enumeration. Assign Unspecified to this property to use the corresponding value from the current theme.

 Remarks

ControlStyle can be used only if this property is set to Custom.

 Example

The following example sets custom colors for the calendar buttons. The example assumes that calendar references an existing Calendar control.

C#  Copy Code

calendar.CurrentView = CalendarView.SingleMonth;
calendar.MonthSettings.HeaderStyle =
    MonthHeaderStyles.Title | MonthHeaderStyles.MonthButtons;

calendar.ControlAppearance = ControlAppearance.Custom;
calendar.ControlStyle.ButtonFillBrush =
    new MindFusion.Drawing.LinearGradientBrush(
        Color.White, Color.Violet, 90);
calendar.ControlStyle.ButtonFillBrushOver =
    new MindFusion.Drawing.LinearGradientBrush(
        Color.White, Color.LightPink, 90);
calendar.ControlStyle.ButtonFillBrushDown =
    new MindFusion.Drawing.LinearGradientBrush(
        Color.MediumOrchid, Color.Violet, 90);

calendar.UpdateLayout();

Visual Basic  Copy Code

calendar.CurrentView = CalendarView.SingleMonth
calendar.MonthSettings.HeaderStyle =
    MonthHeaderStyles.Title Or MonthHeaderStyles.MonthButtons

calendar.ControlAppearance = ControlAppearance.Custom
calendar.ControlStyle.ButtonFillBrush = _
    New MindFusion.Drawing.LinearGradientBrush( _
        Color.White, Color.Violet, 90)
calendar.ControlStyle.ButtonFillBrushOver = _
    New MindFusion.Drawing.LinearGradientBrush( _
        Color.White, Color.LightPink, 90)
calendar.ControlStyle.ButtonFillBrushDown = _
    New MindFusion.Drawing.LinearGradientBrush( _
        Color.MediumOrchid, Color.Violet, 90)

calendar.UpdateLayout()

 See Also

Calendar Members
Calendar Class
MindFusion.Scheduling.WinForms Namespace
ControlStyle Property