Share via


AdornerColors Class

Provides a set of common brushes that can be used on adorners.

Inheritance Hierarchy

System.Object
  Microsoft.Windows.Design.Interaction.AdornerColors

Namespace:  Microsoft.Windows.Design.Interaction
Assembly:  Microsoft.Windows.Design.Interaction (in Microsoft.Windows.Design.Interaction.dll)

Syntax

'Declaration
Public NotInheritable Class AdornerColors
public static class AdornerColors
public ref class AdornerColors abstract sealed
[<AbstractClass>]
[<Sealed>]
type AdornerColors =  class end
public final class AdornerColors

The AdornerColors type exposes the following members.

Properties

  Name Description
Public propertyStatic member AlignmentMarkBrush Gets the brush used for the alignment marks.
Public propertyStatic member AlignmentMarkBrushKey Gets a resource key for the color of alignment marks.
Public propertyStatic member AlignmentMarkColor Gets the color that is used for the alignment marks.
Public propertyStatic member AlignmentMarkColorKey Gets a resource key for the color of alignment marks.
Public propertyStatic member ElementBorderBrush Gets the brush used for the borders of elements.
Public propertyStatic member ElementBorderBrushKey Gets a resource key for the brush of borders of elements.
Public propertyStatic member ElementBorderColor Gets the color that is used for the borders of elements.
Public propertyStatic member ElementBorderColorKey Gets a resource key for the color of borders of elements.
Public propertyStatic member GlyphFillBrush Gets the brush used for the fill of any glyph.
Public propertyStatic member GlyphFillBrushKey Gets a resource key for the brush used to fill a glyph.
Public propertyStatic member GlyphFillColor Gets the color that is used for the fill of any glyph.
Public propertyStatic member GlyphFillColorKey Gets a resource key for the color that is used to fill a glyph.
Public propertyStatic member HandleBorderBrush Gets a brush to paint the border of a handle.
Public propertyStatic member HandleBorderBrushKey Gets a resource key for the border brush of a handle.
Public propertyStatic member HandleBorderColor Gets the color of a handle border.
Public propertyStatic member HandleBorderColorKey Gets a resource key for the color of a handle border.
Public propertyStatic member HandleEmptyFillBrush Gets the brush to paint the fill of a handle when it is not resizable.
Public propertyStatic member HandleEmptyFillBrushKey Gets the resource key for the brush of a handle when it is not resizable.
Public propertyStatic member HandleEmptyFillColor Gets the color of a handle when it is not resizable.
Public propertyStatic member HandleEmptyFillColorKey Gets the resource key for the color of a handle when it is not resizable.
Public propertyStatic member HandleFillBrush Gets a brush to paint the fill of a handle.
Public propertyStatic member HandleFillBrushKey Gets a resource key for the brush of a handle.
Public propertyStatic member HandleFillColor Gets the color of a handle.
Public propertyStatic member HandleFillColorKey Gets a resource key for the color of a handle.
Public propertyStatic member HandleFillHoverBrush Gets a brush to paint the fill of a handle when the mouse pointer is over it.
Public propertyStatic member HandleFillHoverBrushKey Gets a resource key for the brush of a handle when the mouse pointer is over it.
Public propertyStatic member HandleFillHoverColor Gets the color of a handle when the mouse pointer is over it.
Public propertyStatic member HandleFillHoverColorKey Gets a resource key for the color of a handle when the mouse pointer is over it.
Public propertyStatic member HandleFillPressedBrush Gets a brush to paint the fill of a handle when it is pressed.
Public propertyStatic member HandleFillPressedBrushKey Gets a resource key for the brush of a handle when it is pressed.
Public propertyStatic member HandleFillPressedColor Gets the color of a handle when it is pressed.
Public propertyStatic member HandleFillPressedColorKey Gets a resource key for the color of a handle when it is pressed.
Public propertyStatic member MoveHandleContentBrush Gets the brush used for the content of a move handle.
Public propertyStatic member MoveHandleContentBrushKey Gets a resource key for the brush used for the content of a move handle.
Public propertyStatic member MoveHandleContentColor Gets the color that is used for the content of a move handle.
Public propertyStatic member MoveHandleContentColorKey Gets a resource key for the color that is used for the content of a move handle.
Public propertyStatic member MoveHandleFillBrush Gets the brush used for the fill of a move handle when the mouse pointer is not over it.
Public propertyStatic member MoveHandleFillBrushKey Gets a resource key for the brush used for the fill of a move handle when the mouse pointer is not over it.
Public propertyStatic member MoveHandleFillColor Gets the color that is used for the fill of a move handle when the mouse pointer is not over it.
Public propertyStatic member MoveHandleFillColorKey Gets a resource key for the color that is used for the fill of a move handle when the mouse pointer is not over it.
Public propertyStatic member MoveHandleFillHoverBrush Gets the brush used for the fill of a move handle when the mouse pointer is over it.
Public propertyStatic member MoveHandleFillHoverBrushKey Gets a resource key for the brush used for the fill of a move handle when the mouse pointer is over it.
Public propertyStatic member MoveHandleFillHoverColor Gets the color that is used for the fill of a move handle when the mouse pointer is over it.
Public propertyStatic member MoveHandleFillHoverColorKey Gets a resource key for the color that is used for the fill of a move handle when the mouse pointer is over it.
Public propertyStatic member RailFillBrush Gets the fill brush for rails.
Public propertyStatic member RailFillBrushKey Gets a resource key for the brush used for rails.
Public propertyStatic member RailFillColor Gets the fill color for rails.
Public propertyStatic member RailFillColorKey Gets a resource key for the color that is used for rails.
Public propertyStatic member SelectionFrameBorderBrush Gets the brush used for the selection frame around controls.
Public propertyStatic member SelectionFrameBorderBrushKey Gets a resource key for the brush used for the selection frame around controls.
Public propertyStatic member SelectionFrameBorderColor Gets the color that is used for the selection frame around controls.
Public propertyStatic member SelectionFrameBorderColorKey Gets a resource key for the color that is used for the selection frame around controls.
Public propertyStatic member SelectionFrameFillBrush Gets the fill brush for the selection frame used on controls.
Public propertyStatic member SelectionFrameFillBrushKey Gets a resource key for the brush used for the selection frame used on controls.
Public propertyStatic member SelectionFrameFillColor Gets the fill color for the selection frame used on controls.
Public propertyStatic member SelectionFrameFillColorKey Gets a resource key for the color that is used for the selection frame on controls.
Public propertyStatic member SimpleWashBrush Gets a simple wash brush.
Public propertyStatic member SimpleWashBrushKey Gets a resource key for the brush used for simple washes.
Public propertyStatic member SimpleWashColor Gets a simple wash color.
Public propertyStatic member SimpleWashColorKey Gets a resource key for the color that is used for simple washes.
Public propertyStatic member ToggledGlyphFillBrush Gets the brush for a toggled glyph’s fill.
Public propertyStatic member ToggledGlyphFillBrushKey Gets a resource key for the brush used for a toggled glyph's fill.
Public propertyStatic member ToggledGlyphFillColor Gets the color for a toggled glyph’s fill.
Public propertyStatic member ToggledGlyphFillColorKey Gets a resource key for the color for a toggled glyph's fill.

Top

Remarks

Use the AdornerColors class to standardize the appearance of your custom adorner controls. By using this pre-defined set of colors, your custom adorners participate in the color scheme of the WPF Designer.

Examples

The following code example shows how to use the AdornerColors class to set the Background of a Slider control to a standard adorner color. For more information, see Walkthrough: Implementing a Rail Inside a Control.

' Set the slider's background to the rail fill color.
skewSlider.Background = AdornerColors.RailFillBrush
// Set the slider's background to the rail fill color.
skewSlider.Background = AdornerColors.RailFillBrush;

The following code example shows how to use the AdornerResources class to set the Background of a CheckBox control to a standard adorner color. For more information, see Walkthrough: Debugging WPF Custom Controls at Design Time.

' The constructor sets up the adorner control. 
Public Sub New()
    autoSizeCheckBox = New CheckBox()
    autoSizeCheckBox.Content = "AutoSize"
    autoSizeCheckBox.IsChecked = True
    autoSizeCheckBox.FontFamily = AdornerFonts.FontFamily
    autoSizeCheckBox.FontSize = AdornerFonts.FontSize
    autoSizeCheckBox.Background = CType( _
        AdornerResources.FindResource(AdornerColors.RailFillBrushKey),  _
        Brush)
End Sub
// The constructor sets up the adorner control. 
public AutoSizeAdornerProvider()
{
    autoSizeCheckBox = new CheckBox();
    autoSizeCheckBox.Content = "AutoSize";
    autoSizeCheckBox.IsChecked = true;
    autoSizeCheckBox.FontFamily = AdornerFonts.FontFamily;
    autoSizeCheckBox.FontSize = AdornerFonts.FontSize;
    autoSizeCheckBox.Background = AdornerResources.FindResource(
        AdornerColors.RailFillBrushKey) as Brush;
}

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Windows.Design.Interaction Namespace

AdornerPanel

AdornerFonts

AdornerResources

PrimarySelectionAdornerProvider

Other Resources

Walkthrough: Creating a Design-time Adorner

Walkthrough: Implementing a Rail Inside a Control

Walkthrough: Debugging WPF Custom Controls at Design Time

Adorner Architecture