In This Article

ScrollChrome Class

Represents a chrome for use with scroll bars.

public sealed class ScrollChrome : ElementChrome
Inheritance:
object Visual UIElement FrameworkElement Decorator ChromeBase ElementChrome object

Constructors

ScrollChrome()

Initializes an instance of the class.

public ScrollChrome()

Properties

Glyph

The glyph to be rendered by the chrome.

public ScrollChromeGlyph Glyph { get; set; }

Property Value

ScrollChromeGlyph:

The default value is None.

GlyphBackground

The brush used to render the glyph background of the ScrollChrome is in the normal state.

public Brush? GlyphBackground { get; set; }

Property Value

Brush:

The default value is null.

GlyphBackgroundDisabled

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

public Brush? GlyphBackgroundDisabled { get; set; }

Property Value

Brush:

The default value is null.

GlyphBackgroundHover

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

public Brush? GlyphBackgroundHover { get; set; }

Property Value

Brush:

The default value is null.

GlyphBackgroundPressed

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

public Brush? GlyphBackgroundPressed { get; set; }

Property Value

Brush:

The default value is null.

GlyphHighlight

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

public Brush? GlyphHighlight { get; set; }

Property Value

Brush:

The default value is null.

GlyphHighlightDisabled

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

public Brush? GlyphHighlightDisabled { get; set; }

Property Value

Brush:

The default value is null.

GlyphHighlightHover

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

public Brush? GlyphHighlightHover { get; set; }

Property Value

Brush:

The default value is null.

GlyphHighlightPressed

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

public Brush? GlyphHighlightPressed { get; set; }

Property Value

Brush:

The default value is null.

UseAlternateGeometry

Indicates whether the chrome should use an alternate geometry.

public bool UseAlternateGeometry { get; set; }

Property Value

bool:

true if the chrome should use an alternate geometry; otherwise, false.

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.

GetGlyph(DependencyObject)

Gets the value of the Glyph attached property for the specified object.

public static ScrollChromeGlyph GetGlyph(DependencyObject obj)
Parameter Type Description
obj DependencyObject

The object from which the property value is read.

Returns

ScrollChromeGlyph

MeasureOverride(Size)

Measures the child element of a Decorator to prepare for arranging it during the ArrangeOverride(Size) pass.

protected override Size MeasureOverride(Size availableSize)
Parameter Type Description
availableSize Size

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.

SetGlyph(DependencyObject, ScrollChromeGlyph)

Sets the value of the Glyph attached property to the specified object.

public static void SetGlyph(DependencyObject obj, ScrollChromeGlyph value)
Parameter Type Description
obj DependencyObject

The object to which the attached property is written.

value ScrollChromeGlyph

The value to set.

Fields

GlyphBackgroundDisabledProperty

Defines the GlyphBackgroundDisabled property.

public static readonly DependencyProperty GlyphBackgroundDisabledProperty

GlyphBackgroundHoverProperty

Defines the GlyphBackgroundHover property.

public static readonly DependencyProperty GlyphBackgroundHoverProperty

GlyphBackgroundPressedProperty

Defines the GlyphBackgroundPressed property.

public static readonly DependencyProperty GlyphBackgroundPressedProperty

GlyphBackgroundProperty

Defines the GlyphBackground property.

public static readonly DependencyProperty GlyphBackgroundProperty

GlyphHighlightDisabledProperty

Defines the GlyphHighlightDisabled property.

public static readonly DependencyProperty GlyphHighlightDisabledProperty

GlyphHighlightHoverProperty

Defines the GlyphHighlightHover property.

public static readonly DependencyProperty GlyphHighlightHoverProperty

GlyphHighlightPressedProperty

Defines the GlyphHighlightPressed property.

public static readonly DependencyProperty GlyphHighlightPressedProperty

GlyphHighlightProperty

Defines the GlyphHighlight property.

public static readonly DependencyProperty GlyphHighlightProperty

GlyphProperty

Defines the Glyph property.

public static readonly DependencyProperty GlyphProperty

UseAlternateGeometryProperty

Defines the UseAlternateGeometry property.

public static readonly DependencyProperty UseAlternateGeometryProperty

Inherited Members

Extension Methods