HypernovaDesktop Components · docs
Binarymission
WPF › Extended Scroll Viewer › ExtendedScrollViewer

ExtendedScrollViewer

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WPF.Controls.Scrollers

An advanced control class that provides extended Scrollviewer features that can be heavily customised easily.

public class ExtendedScrollViewer : ScrollViewer

Inherits from / implements: ScrollViewer

Remarks

How this control works. It carries no code beyond its properties and the registration of its skin colours (ExtendedScrollViewerSkin): everything it does is done by the template in Themes\Generic.xaml. The scroll bars are ordinary ScrollBars given a template of their own, and they read every setting here through FindAncestor bindings back up to this control. So a property added here does nothing at all until the template binds it - there is no code path that would notice. Two templates, not one. ShouldOverlayContent is a style trigger that swaps the whole template: one lays the bars out in a column and a row beside the content, the other puts them over it. Both templates span the content presenter through OverlaySetupConverter , which is what lets the content run underneath the bars in the overlay case. The size properties are int . WPF measures in device-independent units and everything else in the suite takes a double , so these cannot express a fractional size. They are public and therefore frozen; a customer who needs finer control scales the whole viewer. The minimums default to zero on purpose. They are a floor a customer can opt into, not a size. Defaulted to anything above zero they silently beat VerticalScrollBarWidth and HorizontalScrollBarHeight, which makes those two look as though they do nothing.

Members at a glance

HorizontalScrollBarHeightGets or sets the height of the horizontal scroll bar.
HorizontalScrollBarMinHeightGets or sets the minimum height of the horizontal scroll bar.
IsHorizontalLineScrollerVisualsAvailableGets or sets a value indicating whether the line scrolling visuals for vertical scrollbar, are available for use.
IsVerticalLineScrollerVisualsAvailableGets or sets a value indicating whether this instance is vertical line scroller visuals available.
LineScrollerArrowFillBrushGets or sets the line scroller arrow fill brush.
LineScrollerOnMouseOverBackgroundBrushGets or sets the background brush for the line scroller visuals when in mouse-hover state.
LineScrollerOnMouseOverBorderBrushGets or sets the border brush for the line scroller visuals when in mouse-hover state.
LineScrollerOnNormalBackgroundBrushGets or sets the background brush for the line scroller visuals when in normal state (default).
LineScrollerOnNormalBorderBrushGets or sets the border brush for the line scroller visuals when in normal state (default).
LineScrollerOnPressedBackgroundBrushGets or sets the background brush for the line scroller visuals when in mouse-pressed state.
LineScrollerOnPressedBorderBrushGets or sets the border brush for the line scroller visuals when in mouse-pressed state.
ShouldOverlayContentGets or sets a value indicating whether the scrollbars should render itself overlaid on its content.
ThumbCornerRadiusGets or sets the thumb corner radius.
ThumbOnMouseOverBackgroundBrushGets or sets the background brush for the thumb visual when in mouse-hover state.
ThumbOnNormalFillBrushGets or sets the fill brush for the thumb when in normal state (default).
ThumbOnPressedBackgroundBrushGets or sets the background brush for the thumb visual when in mouse-pressed state.
TrackBackgroundBrushGets or sets the track background brush.
VerticalScrollBarMinWidthGets or sets the minimum width of the vertical scroll bar.
VerticalScrollBarWidthGets or sets the width of the vertical scroll bar.
HorizontalScrollBarHeightPropertyThe horizontal scroll bar height property
HorizontalScrollBarMinHeightPropertyThe horizontal scroll bar minimum height property
IsHorizontalLineScrollerVisualsAvailablePropertyIdentifies the IsHorizontalLineScrollerVisualsAvailable dependency property.
IsVerticalLineScrollerVisualsAvailablePropertyIdentifies the IsVerticalLineScrollerVisualsAvailable dependency property.
LineScrollerArrowFillBrushPropertyIdentifies the LineScrollerArrowFillBrush dependency property.
LineScrollerOnMouseOverBackgroundBrushPropertyIdentifies the LineScrollerOnMouseOverBackgroundBrush dependency property.
LineScrollerOnMouseOverBorderBrushPropertyIdentifies the LineScrollerOnMouseOverBorderBrush dependency property.
LineScrollerOnNormalBackgroundBrushPropertyIdentifies the LineScrollerOnNormalBackgroundBrush dependency property.
LineScrollerOnNormalBorderBrushPropertyIdentifies the LineScrollerOnNormalBorderBrush dependency property.
LineScrollerOnPressedBackgroundBrushPropertyIdentifies the LineScrollerOnPressedBackgroundBrush dependency property.
LineScrollerOnPressedBorderBrushPropertyIdentifies the LineScrollerOnPressedBorderBrush dependency property.
ShouldOverlayContentPropertyIdentifies the ShouldOverlayContent dependency property.
ThumbCornerRadiusPropertyThe thumb corner radius property
ThumbOnMouseOverBackgroundBrushPropertyIdentifies the ThumbOnMouseOverBackgroundBrush dependency property.
ThumbOnNormalFillBrushPropertyIdentifies the ThumbOnNormalFillBrush dependency property.
ThumbOnPressedBackgroundBrushPropertyIdentifies the ThumbOnPressedBackgroundBrush dependency property.
TrackBackgroundBrushPropertyThe track background brush property
VerticalScrollBarMinWidthPropertyThe vertical scroll bar minimum width property
VerticalScrollBarWidthPropertyThe vertical scroll bar width property

Properties

HorizontalScrollBarHeight

public int HorizontalScrollBarHeight

Gets or sets the height of the horizontal scroll bar.

Value. The height of the horizontal scroll bar.

HorizontalScrollBarMinHeight

public int HorizontalScrollBarMinHeight

Gets or sets the minimum height of the horizontal scroll bar.

Value. The minimum height of the horizontal scroll bar.

IsHorizontalLineScrollerVisualsAvailable

public bool IsHorizontalLineScrollerVisualsAvailable

Gets or sets a value indicating whether the line scrolling visuals for vertical scrollbar, are available for use.

IsVerticalLineScrollerVisualsAvailable

public bool IsVerticalLineScrollerVisualsAvailable

Gets or sets a value indicating whether this instance is vertical line scroller visuals available.

LineScrollerArrowFillBrush

public Brush LineScrollerArrowFillBrush

Gets or sets the line scroller arrow fill brush.

LineScrollerOnMouseOverBackgroundBrush

public Brush LineScrollerOnMouseOverBackgroundBrush

Gets or sets the background brush for the line scroller visuals when in mouse-hover state.

LineScrollerOnMouseOverBorderBrush

public Brush LineScrollerOnMouseOverBorderBrush

Gets or sets the border brush for the line scroller visuals when in mouse-hover state.

LineScrollerOnNormalBackgroundBrush

public Brush LineScrollerOnNormalBackgroundBrush

Gets or sets the background brush for the line scroller visuals when in normal state (default).

LineScrollerOnNormalBorderBrush

public Brush LineScrollerOnNormalBorderBrush

Gets or sets the border brush for the line scroller visuals when in normal state (default).

LineScrollerOnPressedBackgroundBrush

public Brush LineScrollerOnPressedBackgroundBrush

Gets or sets the background brush for the line scroller visuals when in mouse-pressed state.

LineScrollerOnPressedBorderBrush

public Brush LineScrollerOnPressedBorderBrush

Gets or sets the border brush for the line scroller visuals when in mouse-pressed state.

ShouldOverlayContent

public bool ShouldOverlayContent

Gets or sets a value indicating whether the scrollbars should render itself overlaid on its content.

ThumbCornerRadius

public CornerRadius ThumbCornerRadius

Gets or sets the thumb corner radius.

Value. The thumb corner radius.

ThumbOnMouseOverBackgroundBrush

public Brush ThumbOnMouseOverBackgroundBrush

Gets or sets the background brush for the thumb visual when in mouse-hover state.

ThumbOnNormalFillBrush

public Brush ThumbOnNormalFillBrush

Gets or sets the fill brush for the thumb when in normal state (default).

ThumbOnPressedBackgroundBrush

public Brush ThumbOnPressedBackgroundBrush

Gets or sets the background brush for the thumb visual when in mouse-pressed state.

TrackBackgroundBrush

public Brush TrackBackgroundBrush

Gets or sets the track background brush.

Value. The track background brush.

VerticalScrollBarMinWidth

public int VerticalScrollBarMinWidth

Gets or sets the minimum width of the vertical scroll bar.

Value. The minimum width of the vertical scroll bar.

VerticalScrollBarWidth

public int VerticalScrollBarWidth

Gets or sets the width of the vertical scroll bar.

Value. The width of the vertical scroll bar.

Fields

HorizontalScrollBarHeightProperty

public static readonly DependencyProperty HorizontalScrollBarHeightProperty

The horizontal scroll bar height property

HorizontalScrollBarMinHeightProperty

public static readonly DependencyProperty HorizontalScrollBarMinHeightProperty

The horizontal scroll bar minimum height property

Zero, so that HorizontalScrollBarHeight decides the height. The template sets both on the bar; a minimum above the height wins, and the default style asks for eighteen.

IsHorizontalLineScrollerVisualsAvailableProperty

public static readonly DependencyProperty IsHorizontalLineScrollerVisualsAvailableProperty

Identifies the IsHorizontalLineScrollerVisualsAvailable dependency property.

IsVerticalLineScrollerVisualsAvailableProperty

public static readonly DependencyProperty IsVerticalLineScrollerVisualsAvailableProperty

Identifies the IsVerticalLineScrollerVisualsAvailable dependency property.

LineScrollerArrowFillBrushProperty

public static readonly DependencyProperty LineScrollerArrowFillBrushProperty

Identifies the LineScrollerArrowFillBrush dependency property.

LineScrollerOnMouseOverBackgroundBrushProperty

public static readonly DependencyProperty LineScrollerOnMouseOverBackgroundBrushProperty

Identifies the LineScrollerOnMouseOverBackgroundBrush dependency property.

LineScrollerOnMouseOverBorderBrushProperty

public static readonly DependencyProperty LineScrollerOnMouseOverBorderBrushProperty

Identifies the LineScrollerOnMouseOverBorderBrush dependency property.

LineScrollerOnNormalBackgroundBrushProperty

public static readonly DependencyProperty LineScrollerOnNormalBackgroundBrushProperty

Identifies the LineScrollerOnNormalBackgroundBrush dependency property.

LineScrollerOnNormalBorderBrushProperty

public static readonly DependencyProperty LineScrollerOnNormalBorderBrushProperty

Identifies the LineScrollerOnNormalBorderBrush dependency property.

LineScrollerOnPressedBackgroundBrushProperty

public static readonly DependencyProperty LineScrollerOnPressedBackgroundBrushProperty

Identifies the LineScrollerOnPressedBackgroundBrush dependency property.

LineScrollerOnPressedBorderBrushProperty

public static readonly DependencyProperty LineScrollerOnPressedBorderBrushProperty

Identifies the LineScrollerOnPressedBorderBrush dependency property.

ShouldOverlayContentProperty

public static readonly DependencyProperty ShouldOverlayContentProperty

Identifies the ShouldOverlayContent dependency property.

ThumbCornerRadiusProperty

public static readonly DependencyProperty ThumbCornerRadiusProperty

The thumb corner radius property

ThumbOnMouseOverBackgroundBrushProperty

public static readonly DependencyProperty ThumbOnMouseOverBackgroundBrushProperty

Identifies the ThumbOnMouseOverBackgroundBrush dependency property.

ThumbOnNormalFillBrushProperty

public static readonly DependencyProperty ThumbOnNormalFillBrushProperty

Identifies the ThumbOnNormalFillBrush dependency property.

ThumbOnPressedBackgroundBrushProperty

public static readonly DependencyProperty ThumbOnPressedBackgroundBrushProperty

Identifies the ThumbOnPressedBackgroundBrush dependency property.

TrackBackgroundBrushProperty

public static readonly DependencyProperty TrackBackgroundBrushProperty

The track background brush property

The default is frozen. A dependency property's default is one object shared by every instance in the process, so an unfrozen brush here is a brush any caller can reach and recolour for every scroll viewer in the application at once. The rest of the defaults on this control are Brushes statics, which are frozen already.

VerticalScrollBarMinWidthProperty

public static readonly DependencyProperty VerticalScrollBarMinWidthProperty

The vertical scroll bar minimum width property

Zero, so that VerticalScrollBarWidth decides the width - see HorizontalScrollBarMinHeightProperty.

VerticalScrollBarWidthProperty

public static readonly DependencyProperty VerticalScrollBarWidthProperty

The vertical scroll bar width property