ElementChrome Class
Represents a chrome for use with edit boxes, lists, buttons, etc.
public class ElementChrome : ChromeBase
- Inheritance:
- object Visual UIElement FrameworkElement Decorator ChromeBase object
- Derived:
- ScrollChrome
Constructors
ElementChrome()
Initializes an instance of the class.
public ElementChrome()
Properties
Background
Gets or sets the brush used to render the background of the ElementChrome is in the normal state. This is a dependency property.
public Brush Background { get; set; }
Property Value
- Brush:
The brush used to render the background of the ElementChrome is in the normal state. The default value is
null
.
BackgroundChecked
Gets or sets the brush used to render the background of the ElementChrome is in the checked state. This is a dependency property.
public Brush BackgroundChecked { get; set; }
Property Value
- Brush:
The brush used to render the background of the ElementChrome is in the checked state. The default value is
null
.
BackgroundDefaulted
Gets or sets the brush used to render the background of the ElementChrome is in the defaulted state. This is a dependency property.
public Brush BackgroundDefaulted { get; set; }
Property Value
- Brush:
The brush used to render the background of the ElementChrome is in the defaulted state. The default value is
null
.
BackgroundDisabled
Gets or sets the brush used to render the background of the ElementChrome is in the disabled state. This is a dependency property.
public Brush BackgroundDisabled { get; set; }
Property Value
- Brush:
The brush used to render the background of the ElementChrome is in the disabled state. The default value is
null
.
BackgroundFocused
Gets or sets the brush used to render the background of the ElementChrome is in the focused state. This is a dependency property.
public Brush BackgroundFocused { get; set; }
Property Value
- Brush:
The brush used to render the background of the ElementChrome is in the focused state. The default value is
null
.
BackgroundHover
Gets or sets the brush used to render the background of the ElementChrome is in the hover state. This is a dependency property.
public Brush BackgroundHover { get; set; }
Property Value
- Brush:
The brush used to render the background of the ElementChrome is in the hover state. The default value is
null
.
BackgroundPressed
Gets or sets the brush used to render the background of the ElementChrome is in the pressed state. This is a dependency property.
public Brush BackgroundPressed { get; set; }
Property Value
- Brush:
The brush used to render the background of the ElementChrome is in the pressed state. The default value is
null
.
BorderBrush
Gets or sets the brush used to render the border of the ElementChrome is in the normal state. This is a dependency property.
public Brush BorderBrush { get; set; }
Property Value
- Brush:
The brush used to render the border of the ElementChrome is in the normal state. The default value is
null
.
BorderBrushChecked
Gets or sets the brush used to render the border of the ElementChrome is in the checked state. This is a dependency property.
public Brush BorderBrushChecked { get; set; }
Property Value
- Brush:
The brush used to render the border of the ElementChrome is in the checked state. The default value is
null
.
BorderBrushDefaulted
Gets or sets the brush used to render the border of the ElementChrome is in the defaulted state. This is a dependency property.
public Brush BorderBrushDefaulted { get; set; }
Property Value
- Brush:
The brush used to render the border of the ElementChrome is in the defaulted state. The default value is
null
.
BorderBrushDisabled
Gets or sets the brush used to render the border of the ElementChrome is in the disabled state. This is a dependency property.
public Brush BorderBrushDisabled { get; set; }
Property Value
- Brush:
The brush used to render the border of the ElementChrome is in the disabled state. The default value is
null
.
BorderBrushFocused
Gets or sets the brush used to render the border of the ElementChrome is in the focused state. This is a dependency property.
public Brush BorderBrushFocused { get; set; }
Property Value
- Brush:
The brush used to render the border of the ElementChrome is in the focused state. The default value is
null
.
BorderBrushHover
Gets or sets the brush used to render the border of the ElementChrome is in the hover state. This is a dependency property.
public Brush BorderBrushHover { get; set; }
Property Value
- Brush:
The brush used to render the border of the ElementChrome is in the hover state. The default value is
null
.
BorderBrushPressed
Gets or sets the brush used to render the border of the ElementChrome is in the pressed state. This is a dependency property.
public Brush BorderBrushPressed { get; set; }
Property Value
- Brush:
The brush used to render the border of the ElementChrome is in the pressed state. The default value is
null
.
BorderStyle
Gets or sets the style used when rendering the border of the ElementChrome. This is a dependency property.
public ElementChromeBorderStyle BorderStyle { get; set; }
Property Value
- ElementChromeBorderStyle:
The style used when rendering the border of the ElementChrome. The default value is
ElementChromeBorderStyle.Default
BorderThickness
Gets or sets the border thickness used to render the border of the ElementChrome. This is a dependency property.
public Thickness BorderThickness { get; set; }
Property Value
- Thickness:
The border thickness used to render the border of the ElementChrome. The default value is
0,0,0,0
.
CornerRadius
Gets or sets which corners of should be rounded. This is a dependency property.
public CornerRadius CornerRadius { get; set; }
Property Value
- CornerRadius:
A Corners which indicates which corners should be rounded. The default value is
0,0,0,0
Highlight
Gets or sets the brush used to render the highlight of the ElementChrome is in the normal state. This is a dependency property.
public Brush Highlight { get; set; }
Property Value
- Brush:
The brush used to render the highlight of the ElementChrome is in the normal state. The default value is
null
.
HighlightChecked
Gets or sets the brush used to render the highlight of the ElementChrome is in the checked state. This is a dependency property.
public Brush HighlightChecked { get; set; }
Property Value
- Brush:
The brush used to render the highlight of the ElementChrome is in the checked state. The default value is
null
.
HighlightDefaulted
Gets or sets the brush used to render the highlight of the ElementChrome is in the defaulted state. This is a dependency property.
public Brush HighlightDefaulted { get; set; }
Property Value
- Brush:
The brush used to render the highlight of the ElementChrome is in the defaulted state. The default value is
null
.
HighlightDisabled
Gets or sets the brush used to render the highlight of the ElementChrome is in the disabled state. This is a dependency property.
public Brush HighlightDisabled { get; set; }
Property Value
- Brush:
The brush used to render the highlight of the ElementChrome is in the disabled state. The default value is
null
.
HighlightFocused
Gets or sets the brush used to render the highlight of the ElementChrome is in the focused state. This is a dependency property.
public Brush HighlightFocused { get; set; }
Property Value
- Brush:
The brush used to render the highlight of the ElementChrome is in the focused state. The default value is
null
.
HighlightHover
Gets or sets the brush used to render the highlight of the ElementChrome is in the hover state. This is a dependency property.
public Brush HighlightHover { get; set; }
Property Value
- Brush:
The brush used to render the highlight of the ElementChrome is in the hover state. The default value is
null
.
HighlightPressed
Gets or sets the brush used to render the highlight of the ElementChrome is in the pressed state. This is a dependency property.
public Brush HighlightPressed { get; set; }
Property Value
- Brush:
The brush used to render the highlight of the ElementChrome is in the pressed state. The default value is
null
.
InnerBorderBrush
Gets or sets the brush used to render the inner border of the ElementChrome is in the normal state. This is a dependency property.
public Brush InnerBorderBrush { get; set; }
Property Value
- Brush:
The brush used to render the inner border of the ElementChrome is in the normal state. The default value is
null
.
InnerBorderBrushChecked
Gets or sets the brush used to render the inner border of the ElementChrome is in the checked state. This is a dependency property.
public Brush InnerBorderBrushChecked { get; set; }
Property Value
- Brush:
The brush used to render the inner border of the ElementChrome is in the checked state. The default value is
null
.
InnerBorderBrushDefaulted
Gets or sets the brush used to render the inner border of the ElementChrome is in the defaulted state. This is a dependency property.
public Brush InnerBorderBrushDefaulted { get; set; }
Property Value
- Brush:
The brush used to render the inner border of the ElementChrome is in the defaulted state. The default value is
null
.
InnerBorderBrushDisabled
Gets or sets the brush used to render the inner border of the ElementChrome is in the disabled state. This is a dependency property.
public Brush InnerBorderBrushDisabled { get; set; }
Property Value
- Brush:
The brush used to render the inner border of the ElementChrome is in the disabled state. The default value is
null
.
InnerBorderBrushFocused
Gets or sets the brush used to render the inner border of the ElementChrome is in the focused state. This is a dependency property.
public Brush InnerBorderBrushFocused { get; set; }
Property Value
- Brush:
The brush used to render the inner border of the ElementChrome is in the focused state. The default value is
null
.
InnerBorderBrushHover
Gets or sets the brush used to render the inner border of the ElementChrome is in the hover state. This is a dependency property.
public Brush InnerBorderBrushHover { get; set; }
Property Value
- Brush:
The brush used to render the inner border of the ElementChrome is in the hover state. The default value is
null
.
InnerBorderBrushPressed
Gets or sets the brush used to render the inner border of the ElementChrome is in the pressed state. This is a dependency property.
public Brush InnerBorderBrushPressed { get; set; }
Property Value
- Brush:
The brush used to render the inner border of the ElementChrome is in the pressed state. The default value is
null
.
InnerBorderThickness
Gets or sets the border thickness used to render the inner border of the ElementChrome. This is a dependency property.
public Thickness InnerBorderThickness { get; set; }
Property Value
- Thickness:
The border thickness used to render the inner border of the ElementChrome. The default value is
0,0,0,0
.
LastState
Gets the previous state of the ElementChrome. This is a dependency property.
public ElementChromeState LastState { get; }
Property Value
- ElementChromeState:
The previous state of the ElementChrome. The default value is
ElementChromeState.Normal
.
Padding
Gets or sets the padding used inside the control. This is a dependency property.
public Thickness Padding { get; set; }
Property Value
- Thickness:
The padding used inside the control. The default value is
0
State
Gets or sets the current state of the chrome. This is a dependency property.
public ElementChromeState State { get; set; }
Property Value
- ElementChromeState:
The current state of the chrome. The default value is
ElementChromeState.Normal
Methods
ArrangeOverride(Size)
Arranges the content of the ElementChrome element.
protected override Size ArrangeOverride(Size arrangeSize)
Parameter | Type | Description |
---|---|---|
arrangeSize | Size | The System.Windows.Size this element uses to arrange its child content. |
Returns
- Size:
The System.Windows.Size that represents the arranged size of this ElementChrome element and its child.
MeasureOverride(Size)
Measures the child element of the ElementChrome to prepare for arranging it during the arrange pass.
protected override Size MeasureOverride(Size constraint)
Parameter | Type | Description |
---|---|---|
constraint | Size | An upper limit System.Windows.Size that should not be exceeded. |
Returns
- Size:
The target System.Windows.Size of the element.
OnRender(DrawingContext)
Renders the ElementChrome using the various settings.
protected override void OnRender(DrawingContext drawingContext)
Parameter | Type | Description |
---|---|---|
drawingContext | DrawingContext | The drawing instructions for a specific element. This context is provided to the layout system. |
Fields
BackgroundCheckedProperty
Identifies the BackgroundChecked dependency property. This field is read-only.
public static readonly DependencyProperty BackgroundCheckedProperty
BackgroundDefaultedProperty
Identifies the BackgroundDefaulted dependency property. This field is read-only.
public static readonly DependencyProperty BackgroundDefaultedProperty
BackgroundDisabledProperty
Identifies the BackgroundDisabled dependency property. This field is read-only.
public static readonly DependencyProperty BackgroundDisabledProperty
BackgroundFocusedProperty
Identifies the BackgroundFocused dependency property. This field is read-only.
public static readonly DependencyProperty BackgroundFocusedProperty
BackgroundHoverProperty
Identifies the BackgroundHover dependency property. This field is read-only.
public static readonly DependencyProperty BackgroundHoverProperty
BackgroundPressedProperty
Identifies the BackgroundPressed dependency property. This field is read-only.
public static readonly DependencyProperty BackgroundPressedProperty
BackgroundProperty
Identifies the Background dependency property. This field is read-only.
public static readonly DependencyProperty BackgroundProperty
BorderBrushCheckedProperty
Identifies the BorderBrushChecked dependency property. This field is read-only.
public static readonly DependencyProperty BorderBrushCheckedProperty
BorderBrushDefaultedProperty
Identifies the BorderBrushDefaulted dependency property. This field is read-only.
public static readonly DependencyProperty BorderBrushDefaultedProperty
BorderBrushDisabledProperty
Identifies the BorderBrushDisabled dependency property. This field is read-only.
public static readonly DependencyProperty BorderBrushDisabledProperty
BorderBrushFocusedProperty
Identifies the BorderBrushFocused dependency property. This field is read-only.
public static readonly DependencyProperty BorderBrushFocusedProperty
BorderBrushHoverProperty
Identifies the BorderBrushHover dependency property. This field is read-only.
public static readonly DependencyProperty BorderBrushHoverProperty
BorderBrushPressedProperty
Identifies the BorderBrushPressed dependency property. This field is read-only.
public static readonly DependencyProperty BorderBrushPressedProperty
BorderBrushProperty
Identifies the BorderBrush dependency property. This field is read-only.
public static readonly DependencyProperty BorderBrushProperty
BorderStyleProperty
Identifies the BorderStyle dependency property. This field is read-only.
public static readonly DependencyProperty BorderStyleProperty
BorderThicknessProperty
Identifies the BorderThickness dependency property. This field is read-only.
public static readonly DependencyProperty BorderThicknessProperty
CornerRadiusProperty
Identifies the CornerRadius dependency property. This field is read-only.
public static readonly DependencyProperty CornerRadiusProperty
HighlightCheckedProperty
Identifies the HighlightChecked dependency property. This field is read-only.
public static readonly DependencyProperty HighlightCheckedProperty
HighlightDefaultedProperty
Identifies the HighlightDefaulted dependency property. This field is read-only.
public static readonly DependencyProperty HighlightDefaultedProperty
HighlightDisabledProperty
Identifies the HighlightDisabled dependency property. This field is read-only.
public static readonly DependencyProperty HighlightDisabledProperty
HighlightFocusedProperty
Identifies the HighlightFocused dependency property. This field is read-only.
public static readonly DependencyProperty HighlightFocusedProperty
HighlightHoverProperty
Identifies the HighlightHover dependency property. This field is read-only.
public static readonly DependencyProperty HighlightHoverProperty
HighlightPressedProperty
Identifies the HighlightPressed dependency property. This field is read-only.
public static readonly DependencyProperty HighlightPressedProperty
HighlightProperty
Identifies the Highlight dependency property. This field is read-only.
public static readonly DependencyProperty HighlightProperty
InnerBorderBrushCheckedProperty
Identifies the InnerBorderBrushChecked dependency property. This field is read-only.
public static readonly DependencyProperty InnerBorderBrushCheckedProperty
InnerBorderBrushDefaultedProperty
Identifies the InnerBorderBrushDefaulted dependency property. This field is read-only.
public static readonly DependencyProperty InnerBorderBrushDefaultedProperty
InnerBorderBrushDisabledProperty
Identifies the InnerBorderBrushDisabled dependency property. This field is read-only.
public static readonly DependencyProperty InnerBorderBrushDisabledProperty
InnerBorderBrushFocusedProperty
Identifies the InnerBorderBrushFocused dependency property. This field is read-only.
public static readonly DependencyProperty InnerBorderBrushFocusedProperty
InnerBorderBrushHoverProperty
Identifies the InnerBorderBrushHover dependency property. This field is read-only.
public static readonly DependencyProperty InnerBorderBrushHoverProperty
InnerBorderBrushPressedProperty
Identifies the InnerBorderBrushPressed dependency property. This field is read-only.
public static readonly DependencyProperty InnerBorderBrushPressedProperty
InnerBorderBrushProperty
Identifies the InnerBorderBrush dependency property. This field is read-only.
public static readonly DependencyProperty InnerBorderBrushProperty
InnerBorderThicknessProperty
Identifies the InnerBorderThickness dependency property. This field is read-only.
public static readonly DependencyProperty InnerBorderThicknessProperty
LastStateProperty
Identifies the read-only LastState dependency property. This field is read-only.
public static readonly DependencyProperty LastStateProperty
PaddingProperty
Identifies the Padding dependency property. This field is read-only.
public static readonly DependencyProperty PaddingProperty
StateProperty
Identifies the State dependency property. This field is read-only.
public static readonly DependencyProperty StateProperty