In This Article

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.

public Brush? Background { get; set; }

Property Value

Brush:

The default value is null.

BackgroundChecked

The brush used to render the background of the ElementChrome is in the checked state.

public Brush? BackgroundChecked { get; set; }

Property Value

Brush:

The default value is null.

BackgroundDefaulted

The brush used to render the background of the ElementChrome is in the defaulted state.

public Brush? BackgroundDefaulted { get; set; }

Property Value

Brush:

The default value is null.

BackgroundDisabled

The brush used to render the background of the ElementChrome is in the disabled state.

public Brush? BackgroundDisabled { get; set; }

Property Value

Brush:

The default value is null.

BackgroundFocused

The brush used to render the background of the ElementChrome is in the focused state.

public Brush? BackgroundFocused { get; set; }

Property Value

Brush:

The default value is null.

BackgroundHover

The brush used to render the background of the ElementChrome is in the hover state.

public Brush? BackgroundHover { get; set; }

Property Value

Brush:

The default value is null.

BackgroundPressed

The brush used to render the background of the ElementChrome is in the pressed state.

public Brush? BackgroundPressed { get; set; }

Property Value

Brush:

The default value is null.

BorderBrush

The brush used to render the border of the ElementChrome is in the normal state.

public Brush? BorderBrush { get; set; }

Property Value

Brush:

The default value is null.

BorderBrushChecked

The brush used to render the border of the ElementChrome is in the checked state.

public Brush? BorderBrushChecked { get; set; }

Property Value

Brush:

The default value is null.

BorderBrushDefaulted

The brush used to render the border of the ElementChrome is in the defaulted state.

public Brush? BorderBrushDefaulted { get; set; }

Property Value

Brush:

The default value is null.

BorderBrushDisabled

The brush used to render the border of the ElementChrome is in the disabled state.

public Brush? BorderBrushDisabled { get; set; }

Property Value

Brush:

The default value is null.

BorderBrushFocused

The brush used to render the border of the ElementChrome is in the focused state.

public Brush? BorderBrushFocused { get; set; }

Property Value

Brush:

The default value is null.

BorderBrushHover

The brush used to render the border of the ElementChrome is in the hover state.

public Brush? BorderBrushHover { get; set; }

Property Value

Brush:

The default value is null.

BorderBrushPressed

The brush used to render the border of the ElementChrome is in the pressed state.

public Brush? BorderBrushPressed { get; set; }

Property Value

Brush:

The default value is null.

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.

public Brush? Highlight { get; set; }

Property Value

Brush:

The default value is null.

HighlightChecked

The brush used to render the highlight of the ElementChrome is in the checked state.

public Brush? HighlightChecked { get; set; }

Property Value

Brush:

The default value is null.

HighlightDefaulted

The brush used to render the highlight of the ElementChrome is in the defaulted state.

public Brush? HighlightDefaulted { get; set; }

Property Value

Brush:

The default value is null.

HighlightDisabled

The brush used to render the highlight of the ElementChrome is in the disabled state.

public Brush? HighlightDisabled { get; set; }

Property Value

Brush:

The default value is null.

HighlightFocused

The brush used to render the highlight of the ElementChrome is in the focused state.

public Brush? HighlightFocused { get; set; }

Property Value

Brush:

The default value is null.

HighlightHover

The brush used to render the highlight of the ElementChrome is in the hover state.

public Brush? HighlightHover { get; set; }

Property Value

Brush:

The default value is null.

HighlightPressed

The brush used to render the highlight of the ElementChrome is in the pressed state.

public Brush? HighlightPressed { get; set; }

Property Value

Brush:

The default value is null.

InnerBorderBrush

The brush used to render the inner border of the ElementChrome is in the normal state.

public Brush? InnerBorderBrush { get; set; }

Property Value

Brush:

The default value is null.

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.

public Brush? InnerBorderBrushHover { get; set; }

Property Value

Brush:

The default value is null.

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.

public Thickness Padding { get; set; }

Property Value

Thickness:

The default value is 0,0,0,0

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

Extension Methods