ExtendedScrollViewer
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
HorizontalScrollBarHeight | Gets or sets the height of the horizontal scroll bar. |
HorizontalScrollBarMinHeight | Gets or sets the minimum height of the horizontal scroll bar. |
IsHorizontalLineScrollerVisualsAvailable | Gets or sets a value indicating whether the line scrolling visuals for vertical scrollbar, are available for use. |
IsVerticalLineScrollerVisualsAvailable | Gets or sets a value indicating whether this instance is vertical line scroller visuals available. |
LineScrollerArrowFillBrush | Gets or sets the line scroller arrow fill brush. |
LineScrollerOnMouseOverBackgroundBrush | Gets or sets the background brush for the line scroller visuals when in mouse-hover state. |
LineScrollerOnMouseOverBorderBrush | Gets or sets the border brush for the line scroller visuals when in mouse-hover state. |
LineScrollerOnNormalBackgroundBrush | Gets or sets the background brush for the line scroller visuals when in normal state (default). |
LineScrollerOnNormalBorderBrush | Gets or sets the border brush for the line scroller visuals when in normal state (default). |
LineScrollerOnPressedBackgroundBrush | Gets or sets the background brush for the line scroller visuals when in mouse-pressed state. |
LineScrollerOnPressedBorderBrush | Gets or sets the border brush for the line scroller visuals when in mouse-pressed state. |
ShouldOverlayContent | Gets or sets a value indicating whether the scrollbars should render itself overlaid on its content. |
ThumbCornerRadius | Gets or sets the thumb corner radius. |
ThumbOnMouseOverBackgroundBrush | Gets or sets the background brush for the thumb visual when in mouse-hover state. |
ThumbOnNormalFillBrush | Gets or sets the fill brush for the thumb when in normal state (default). |
ThumbOnPressedBackgroundBrush | Gets or sets the background brush for the thumb visual when in mouse-pressed state. |
TrackBackgroundBrush | Gets or sets the track background brush. |
VerticalScrollBarMinWidth | Gets or sets the minimum width of the vertical scroll bar. |
VerticalScrollBarWidth | Gets or sets the width of the vertical scroll bar. |
HorizontalScrollBarHeightProperty | The horizontal scroll bar height property |
HorizontalScrollBarMinHeightProperty | The horizontal scroll bar minimum height property |
IsHorizontalLineScrollerVisualsAvailableProperty | Identifies the IsHorizontalLineScrollerVisualsAvailable dependency property. |
IsVerticalLineScrollerVisualsAvailableProperty | Identifies the IsVerticalLineScrollerVisualsAvailable dependency property. |
LineScrollerArrowFillBrushProperty | Identifies the LineScrollerArrowFillBrush dependency property. |
LineScrollerOnMouseOverBackgroundBrushProperty | Identifies the LineScrollerOnMouseOverBackgroundBrush dependency property. |
LineScrollerOnMouseOverBorderBrushProperty | Identifies the LineScrollerOnMouseOverBorderBrush dependency property. |
LineScrollerOnNormalBackgroundBrushProperty | Identifies the LineScrollerOnNormalBackgroundBrush dependency property. |
LineScrollerOnNormalBorderBrushProperty | Identifies the LineScrollerOnNormalBorderBrush dependency property. |
LineScrollerOnPressedBackgroundBrushProperty | Identifies the LineScrollerOnPressedBackgroundBrush dependency property. |
LineScrollerOnPressedBorderBrushProperty | Identifies the LineScrollerOnPressedBorderBrush dependency property. |
ShouldOverlayContentProperty | Identifies the ShouldOverlayContent dependency property. |
ThumbCornerRadiusProperty | The thumb corner radius property |
ThumbOnMouseOverBackgroundBrushProperty | Identifies the ThumbOnMouseOverBackgroundBrush dependency property. |
ThumbOnNormalFillBrushProperty | Identifies the ThumbOnNormalFillBrush dependency property. |
ThumbOnPressedBackgroundBrushProperty | Identifies the ThumbOnPressedBackgroundBrush dependency property. |
TrackBackgroundBrushProperty | The track background brush property |
VerticalScrollBarMinWidthProperty | The vertical scroll bar minimum width property |
VerticalScrollBarWidthProperty | The vertical scroll bar width property |
Properties
HorizontalScrollBarHeight
Gets or sets the height of the horizontal scroll bar.
Value. The height of the horizontal scroll bar.
HorizontalScrollBarMinHeight
Gets or sets the minimum height of the horizontal scroll bar.
Value. The minimum height of the horizontal scroll bar.
IsHorizontalLineScrollerVisualsAvailable
Gets or sets a value indicating whether the line scrolling visuals for vertical scrollbar, are available for use.
IsVerticalLineScrollerVisualsAvailable
Gets or sets a value indicating whether this instance is vertical line scroller visuals available.
LineScrollerArrowFillBrush
Gets or sets the line scroller arrow fill brush.
LineScrollerOnMouseOverBackgroundBrush
Gets or sets the background brush for the line scroller visuals when in mouse-hover state.
LineScrollerOnMouseOverBorderBrush
Gets or sets the border brush for the line scroller visuals when in mouse-hover state.
LineScrollerOnNormalBackgroundBrush
Gets or sets the background brush for the line scroller visuals when in normal state (default).
LineScrollerOnNormalBorderBrush
Gets or sets the border brush for the line scroller visuals when in normal state (default).
LineScrollerOnPressedBackgroundBrush
Gets or sets the background brush for the line scroller visuals when in mouse-pressed state.
LineScrollerOnPressedBorderBrush
Gets or sets the border brush for the line scroller visuals when in mouse-pressed state.
ShouldOverlayContent
Gets or sets a value indicating whether the scrollbars should render itself overlaid on its content.
ThumbCornerRadius
Gets or sets the thumb corner radius.
Value. The thumb corner radius.
ThumbOnMouseOverBackgroundBrush
Gets or sets the background brush for the thumb visual when in mouse-hover state.
ThumbOnNormalFillBrush
Gets or sets the fill brush for the thumb when in normal state (default).
ThumbOnPressedBackgroundBrush
Gets or sets the background brush for the thumb visual when in mouse-pressed state.
TrackBackgroundBrush
Gets or sets the track background brush.
Value. The track background brush.
VerticalScrollBarMinWidth
Gets or sets the minimum width of the vertical scroll bar.
Value. The minimum width of the vertical scroll bar.
VerticalScrollBarWidth
Gets or sets the width of the vertical scroll bar.
Value. The width of the vertical scroll bar.
Fields
HorizontalScrollBarHeightProperty
The horizontal scroll bar height property
HorizontalScrollBarMinHeightProperty
The horizontal scroll bar minimum height property
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
Identifies the IsHorizontalLineScrollerVisualsAvailable dependency property.
IsVerticalLineScrollerVisualsAvailableProperty
Identifies the IsVerticalLineScrollerVisualsAvailable dependency property.
LineScrollerArrowFillBrushProperty
Identifies the LineScrollerArrowFillBrush dependency property.
LineScrollerOnMouseOverBackgroundBrushProperty
Identifies the LineScrollerOnMouseOverBackgroundBrush dependency property.
LineScrollerOnMouseOverBorderBrushProperty
Identifies the LineScrollerOnMouseOverBorderBrush dependency property.
LineScrollerOnNormalBackgroundBrushProperty
Identifies the LineScrollerOnNormalBackgroundBrush dependency property.
LineScrollerOnNormalBorderBrushProperty
Identifies the LineScrollerOnNormalBorderBrush dependency property.
LineScrollerOnPressedBackgroundBrushProperty
Identifies the LineScrollerOnPressedBackgroundBrush dependency property.
LineScrollerOnPressedBorderBrushProperty
Identifies the LineScrollerOnPressedBorderBrush dependency property.
ShouldOverlayContentProperty
Identifies the ShouldOverlayContent dependency property.
ThumbCornerRadiusProperty
The thumb corner radius property
ThumbOnMouseOverBackgroundBrushProperty
Identifies the ThumbOnMouseOverBackgroundBrush dependency property.
ThumbOnNormalFillBrushProperty
Identifies the ThumbOnNormalFillBrush dependency property.
ThumbOnPressedBackgroundBrushProperty
Identifies the ThumbOnPressedBackgroundBrush dependency property.
TrackBackgroundBrushProperty
The track background brush property
Brushes statics, which are frozen already.VerticalScrollBarMinWidthProperty
The vertical scroll bar minimum width property
VerticalScrollBarWidth decides the width - see HorizontalScrollBarMinHeightProperty.VerticalScrollBarWidthProperty
The vertical scroll bar width property