Scheduler for WinForms | ComponentOne
C1.Win.C1Schedule.4.8 Assembly / C1.Win.C1Schedule.UI Namespace / ScheduleTheme Class / Palettes Property
Example

In This Topic
    Palettes Property (ScheduleTheme)
    In This Topic
    Gets the Palettes collection available for the current theme.
    Syntax
    'Declaration
     
    Public ReadOnly Property Palettes As Palettes
    public Palettes Palettes {get;}
    Remarks
    If embedded PaletteForm is good enough for your application, you can rely on it and don't use Palettes, Palette and CurrentPalette properties in your code.
    Example
    The next example shows how to switch palettes at run-time from the code.
    // Get available palettes.
    Palettes pals = c1Schedule.Theme.Palettes;
    // Get key color from palette.
    Palette pal = pals[0];
    // You may get key colors from all palettes and show them to the
    // end-user in order to select desired palette.
    // ...
    // Select palette in control.
    c1Schedule.Theme.CurrentPalette = pal.KeyColor;
    See Also