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 | |
---|---|---|
AlignmentMarkBrush | Gets the brush used for the alignment marks. | |
AlignmentMarkBrushKey | Gets a resource key for the color of alignment marks. | |
AlignmentMarkColor | Gets the color that is used for the alignment marks. | |
AlignmentMarkColorKey | Gets a resource key for the color of alignment marks. | |
ElementBorderBrush | Gets the brush used for the borders of elements. | |
ElementBorderBrushKey | Gets a resource key for the brush of borders of elements. | |
ElementBorderColor | Gets the color that is used for the borders of elements. | |
ElementBorderColorKey | Gets a resource key for the color of borders of elements. | |
GlyphFillBrush | Gets the brush used for the fill of any glyph. | |
GlyphFillBrushKey | Gets a resource key for the brush used to fill a glyph. | |
GlyphFillColor | Gets the color that is used for the fill of any glyph. | |
GlyphFillColorKey | Gets a resource key for the color that is used to fill a glyph. | |
HandleBorderBrush | Gets a brush to paint the border of a handle. | |
HandleBorderBrushKey | Gets a resource key for the border brush of a handle. | |
HandleBorderColor | Gets the color of a handle border. | |
HandleBorderColorKey | Gets a resource key for the color of a handle border. | |
HandleEmptyFillBrush | Gets the brush to paint the fill of a handle when it is not resizable. | |
HandleEmptyFillBrushKey | Gets the resource key for the brush of a handle when it is not resizable. | |
HandleEmptyFillColor | Gets the color of a handle when it is not resizable. | |
HandleEmptyFillColorKey | Gets the resource key for the color of a handle when it is not resizable. | |
HandleFillBrush | Gets a brush to paint the fill of a handle. | |
HandleFillBrushKey | Gets a resource key for the brush of a handle. | |
HandleFillColor | Gets the color of a handle. | |
HandleFillColorKey | Gets a resource key for the color of a handle. | |
HandleFillHoverBrush | Gets a brush to paint the fill of a handle when the mouse pointer is over it. | |
HandleFillHoverBrushKey | Gets a resource key for the brush of a handle when the mouse pointer is over it. | |
HandleFillHoverColor | Gets the color of a handle when the mouse pointer is over it. | |
HandleFillHoverColorKey | Gets a resource key for the color of a handle when the mouse pointer is over it. | |
HandleFillPressedBrush | Gets a brush to paint the fill of a handle when it is pressed. | |
HandleFillPressedBrushKey | Gets a resource key for the brush of a handle when it is pressed. | |
HandleFillPressedColor | Gets the color of a handle when it is pressed. | |
HandleFillPressedColorKey | Gets a resource key for the color of a handle when it is pressed. | |
MoveHandleContentBrush | Gets the brush used for the content of a move handle. | |
MoveHandleContentBrushKey | Gets a resource key for the brush used for the content of a move handle. | |
MoveHandleContentColor | Gets the color that is used for the content of a move handle. | |
MoveHandleContentColorKey | Gets a resource key for the color that is used for the content of a move handle. | |
MoveHandleFillBrush | Gets the brush used for the fill of a move handle when the mouse pointer is not over it. | |
MoveHandleFillBrushKey | Gets a resource key for the brush used for the fill of a move handle when the mouse pointer is not over it. | |
MoveHandleFillColor | Gets the color that is used for the fill of a move handle when the mouse pointer is not over it. | |
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. | |
MoveHandleFillHoverBrush | Gets the brush used for the fill of a move handle when the mouse pointer is over it. | |
MoveHandleFillHoverBrushKey | Gets a resource key for the brush used for the fill of a move handle when the mouse pointer is over it. | |
MoveHandleFillHoverColor | Gets the color that is used for the fill of a move handle when the mouse pointer is over it. | |
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. | |
RailFillBrush | Gets the fill brush for rails. | |
RailFillBrushKey | Gets a resource key for the brush used for rails. | |
RailFillColor | Gets the fill color for rails. | |
RailFillColorKey | Gets a resource key for the color that is used for rails. | |
SelectionFrameBorderBrush | Gets the brush used for the selection frame around controls. | |
SelectionFrameBorderBrushKey | Gets a resource key for the brush used for the selection frame around controls. | |
SelectionFrameBorderColor | Gets the color that is used for the selection frame around controls. | |
SelectionFrameBorderColorKey | Gets a resource key for the color that is used for the selection frame around controls. | |
SelectionFrameFillBrush | Gets the fill brush for the selection frame used on controls. | |
SelectionFrameFillBrushKey | Gets a resource key for the brush used for the selection frame used on controls. | |
SelectionFrameFillColor | Gets the fill color for the selection frame used on controls. | |
SelectionFrameFillColorKey | Gets a resource key for the color that is used for the selection frame on controls. | |
SimpleWashBrush | Gets a simple wash brush. | |
SimpleWashBrushKey | Gets a resource key for the brush used for simple washes. | |
SimpleWashColor | Gets a simple wash color. | |
SimpleWashColorKey | Gets a resource key for the color that is used for simple washes. | |
ToggledGlyphFillBrush | Gets the brush for a toggled glyph’s fill. | |
ToggledGlyphFillBrushKey | Gets a resource key for the brush used for a toggled glyph's fill. | |
ToggledGlyphFillColor | Gets the color for a toggled glyph’s fill. | |
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
PrimarySelectionAdornerProvider
Other Resources
Walkthrough: Creating a Design-time Adorner
Walkthrough: Implementing a Rail Inside a Control