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
The brush used to render the background of the ElementChrome is in the normal state.
BackgroundChecked
The brush used to render the background of the ElementChrome is in the checked state.
BackgroundDefaulted
The brush used to render the background of the ElementChrome is in the defaulted state.
BackgroundDisabled
The brush used to render the background of the ElementChrome is in the disabled state.
BackgroundFocused
The brush used to render the background of the ElementChrome is in the focused state.
BackgroundHover
The brush used to render the background of the ElementChrome is in the hover state.
BackgroundPressed
The brush used to render the background of the ElementChrome is in the pressed state.
BorderBrush
The brush used to render the border of the ElementChrome is in the normal state.
BorderBrushChecked
The brush used to render the border of the ElementChrome is in the checked state.
BorderBrushDefaulted
The brush used to render the border of the ElementChrome is in the defaulted state.
BorderBrushDisabled
The brush used to render the border of the ElementChrome is in the disabled state.
BorderBrushFocused
The brush used to render the border of the ElementChrome is in the focused state.
BorderBrushHover
The brush used to render the border of the ElementChrome is in the hover state.
BorderBrushPressed
The brush used to render the border of the ElementChrome is in the pressed state.
BorderStyle
The style used when rendering the border of the ElementChrome.
public ElementChromeBorderStyle BorderStyle { get; set; }
Property Value
- ElementChromeBorderStyle:
The default value is Default.
BorderThickness
The border thickness used to render the border of the ElementChrome.
public Thickness BorderThickness { get; set; }
Property Value
- Thickness:
The default value is
0,0,0,0.
CornerRadius
Gets or sets which corners of should be rounded.
public CornerRadius CornerRadius { get; set; }
Property Value
- CornerRadius:
The default value is
0,0,0,0
Highlight
The brush used to render the highlight of the ElementChrome is in the normal state.
HighlightChecked
The brush used to render the highlight of the ElementChrome is in the checked state.
HighlightDefaulted
The brush used to render the highlight of the ElementChrome is in the defaulted state.
HighlightDisabled
The brush used to render the highlight of the ElementChrome is in the disabled state.
HighlightFocused
The brush used to render the highlight of the ElementChrome is in the focused state.
HighlightHover
The brush used to render the highlight of the ElementChrome is in the hover state.
HighlightPressed
The brush used to render the highlight of the ElementChrome is in the pressed state.
InnerBorderBrush
The brush used to render the inner border of the ElementChrome is in the normal state.
InnerBorderBrushChecked
The brush used to render the inner border of the ElementChrome is in the checked state.
public Brush? InnerBorderBrushChecked { get; set; }
Property Value
- Brush:
The default value is
null.
InnerBorderBrushDefaulted
The brush used to render the inner border of the ElementChrome is in the defaulted state.
public Brush? InnerBorderBrushDefaulted { get; set; }
Property Value
- Brush:
The default value is
null.
InnerBorderBrushDisabled
The brush used to render the inner border of the ElementChrome is in the disabled state.
public Brush? InnerBorderBrushDisabled { get; set; }
Property Value
- Brush:
The default value is
null.
InnerBorderBrushFocused
The brush used to render the inner border of the ElementChrome is in the focused state.
public Brush? InnerBorderBrushFocused { get; set; }
Property Value
- Brush:
The default value is
null.
InnerBorderBrushHover
The brush used to render the inner border of the ElementChrome is in the hover state.
InnerBorderBrushPressed
The brush used to render the inner border of the ElementChrome is in the pressed state.
public Brush? InnerBorderBrushPressed { get; set; }
Property Value
- Brush:
The default value is
null.
InnerBorderThickness
The border thickness used to render the inner border of the ElementChrome.
public Thickness InnerBorderThickness { get; set; }
Property Value
- Thickness:
The default value is
0,0,0,0.
LastState
Gets the previous state of the ElementChrome.
public ElementChromeState LastState { get; }
Property Value
- ElementChromeState:
The default value is Normal.
Padding
The padding used inside the control.
State
The current state of the chrome.
public ElementChromeState State { get; set; }
Property Value
- ElementChromeState:
The default value is Normal.
Methods
ArrangeOverride(Size?)
Arranges the content of a Decorator 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 Decorator element and its child.
MeasureOverride(Size?)
Measures the child element of a Decorator to prepare for arranging it during the ArrangeOverride(Size) 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)
When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.
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
Defines the BackgroundChecked property.
public static readonly DependencyProperty BackgroundCheckedProperty
BackgroundDefaultedProperty
Defines the BackgroundDefaulted property.
public static readonly DependencyProperty BackgroundDefaultedProperty
BackgroundDisabledProperty
Defines the BackgroundDisabled property.
public static readonly DependencyProperty BackgroundDisabledProperty
BackgroundFocusedProperty
Defines the BackgroundFocused property.
public static readonly DependencyProperty BackgroundFocusedProperty
BackgroundHoverProperty
Defines the BackgroundHover property.
public static readonly DependencyProperty BackgroundHoverProperty
BackgroundPressedProperty
Defines the BackgroundPressed property.
public static readonly DependencyProperty BackgroundPressedProperty
BackgroundProperty
Defines the Background property.
public static readonly DependencyProperty BackgroundProperty
BorderBrushCheckedProperty
Defines the BorderBrushChecked property.
public static readonly DependencyProperty BorderBrushCheckedProperty
BorderBrushDefaultedProperty
Defines the BorderBrushDefaulted property.
public static readonly DependencyProperty BorderBrushDefaultedProperty
BorderBrushDisabledProperty
Defines the BorderBrushDisabled property.
public static readonly DependencyProperty BorderBrushDisabledProperty
BorderBrushFocusedProperty
Defines the BorderBrushFocused property.
public static readonly DependencyProperty BorderBrushFocusedProperty
BorderBrushHoverProperty
Defines the BorderBrushHover property.
public static readonly DependencyProperty BorderBrushHoverProperty
BorderBrushPressedProperty
Defines the BorderBrushPressed property.
public static readonly DependencyProperty BorderBrushPressedProperty
BorderBrushProperty
Defines the BorderBrush property.
public static readonly DependencyProperty BorderBrushProperty
BorderStyleProperty
Defines the BorderStyle property.
public static readonly DependencyProperty BorderStyleProperty
BorderThicknessProperty
Defines the BorderThickness property.
public static readonly DependencyProperty BorderThicknessProperty
CornerRadiusProperty
Defines the CornerRadius property.
public static readonly DependencyProperty CornerRadiusProperty
HighlightCheckedProperty
Defines the HighlightChecked property.
public static readonly DependencyProperty HighlightCheckedProperty
HighlightDefaultedProperty
Defines the HighlightDefaulted property.
public static readonly DependencyProperty HighlightDefaultedProperty
HighlightDisabledProperty
Defines the HighlightDisabled property.
public static readonly DependencyProperty HighlightDisabledProperty
HighlightFocusedProperty
Defines the HighlightFocused property.
public static readonly DependencyProperty HighlightFocusedProperty
HighlightHoverProperty
Defines the HighlightHover property.
public static readonly DependencyProperty HighlightHoverProperty
HighlightPressedProperty
Defines the HighlightPressed property.
public static readonly DependencyProperty HighlightPressedProperty
HighlightProperty
Defines the Highlight property.
public static readonly DependencyProperty HighlightProperty
InnerBorderBrushCheckedProperty
Defines the InnerBorderBrushChecked property.
public static readonly DependencyProperty InnerBorderBrushCheckedProperty
InnerBorderBrushDefaultedProperty
Defines the InnerBorderBrushDefaulted property.
public static readonly DependencyProperty InnerBorderBrushDefaultedProperty
InnerBorderBrushDisabledProperty
Defines the InnerBorderBrushDisabled property.
public static readonly DependencyProperty InnerBorderBrushDisabledProperty
InnerBorderBrushFocusedProperty
Defines the InnerBorderBrushFocused property.
public static readonly DependencyProperty InnerBorderBrushFocusedProperty
InnerBorderBrushHoverProperty
Defines the InnerBorderBrushHover property.
public static readonly DependencyProperty InnerBorderBrushHoverProperty
InnerBorderBrushPressedProperty
Defines the InnerBorderBrushPressed property.
public static readonly DependencyProperty InnerBorderBrushPressedProperty
InnerBorderBrushProperty
Defines the InnerBorderBrush property.
public static readonly DependencyProperty InnerBorderBrushProperty
InnerBorderThicknessProperty
Defines the InnerBorderThickness property.
public static readonly DependencyProperty InnerBorderThicknessProperty
LastStateProperty
Defines the LastState property.
public static readonly DependencyProperty LastStateProperty
PaddingProperty
Defines the Padding property.
public static readonly DependencyProperty PaddingProperty
StateProperty
Defines the State property.
public static readonly DependencyProperty StateProperty
Inherited Members
- ChromeBase.IsAnimationEnabledProperty
- ChromeBase.IsAnimationEnabled
- ChromeBase.IsAnimationEnabledResolved