User Interface for .NET / User's Guide / Command Bars / Command Parents Appearance

In This Topic
    Command Parents Appearance
    In This Topic
     Palette

    Each NCommandParent implements INPaletteProvider which is the main interface that describes how an object is rendered. Thus, you have full control over how the object is rendered and what color scheme it uses. For more information see Palettes.

     

    The following code demonstrates how to change the default palette of a NToolbar object:

    C#
    Copy Code
    NToolbar toolbar = new NToolbar();
    toolbar.Palette.Scheme = ColorScheme.Sunset;
    toolbar.Palette.Style3D = Style3D.Flat;
    
    Visual Basic
    Copy Code
    Dim toolbar As NToolbar = New NToolbar()
    toolbar.Palette.Scheme = ColorScheme.Sunset
    toolbar.Palette.Style3D = Style3D.Flat
    
     Background Type

    Each NCommandParent has a property which controls background appearance of the component.

     

    The following table describes available background types:
     

    Background Type Description

    SolidColor

    The parent will use its BackColor property to fill its interior.

    ControlSpecific

    A control specific render logic will be applied. For a NToolbar parent this is a gradient brush with special blending.

    Transparent

    A pseudo-transparency will be applied (the control will ask its parent to paint the background).

     Border And Gripper

    You can specify whether a certain NCommandParent will display gripper and border.

     

    The following code demonstrates how to create an entirely transparent toolbar:

    C#
    Copy Code
    NToolbar toolbar = new NToolbar();
    toolbar.BackgroundType = BackgroundType.Transparent;
    toolbar.HasBorder = false;
    toolbar.HasGripper = false;
    
    Visual Basic
    Copy Code
    Dim toolbar As NToolbar = New NToolbar()
    toolbar.BackgroundType = BackgroundType.Transparent
    toolbar.HasBorder = False
    toolbar.HasGripper = False
    
    See Also