C# Class System.Windows.Controls.ScrollViewer

Inheritance: ContentControl
Show file Open project: shana/moon Class Usage Examples

Public Properties

Property Type Description
ComputedHorizontalScrollBarVisibilityProperty DependencyProperty
ComputedVerticalScrollBarVisibilityProperty DependencyProperty
ExtentHeightProperty DependencyProperty
ExtentWidthProperty DependencyProperty
HorizontalOffsetProperty DependencyProperty
HorizontalScrollBarVisibilityProperty DependencyProperty
ScrollableHeightProperty DependencyProperty
ScrollableWidthProperty DependencyProperty
VerticalOffsetProperty DependencyProperty
VerticalScrollBarVisibilityProperty DependencyProperty
ViewportHeightProperty DependencyProperty
ViewportWidthProperty DependencyProperty

Private Properties

Property Type Description
HandleScroll void
MeasureOverride Size
OnScrollBarVisibilityChanged void
OnScrollInfoDependencyPropertyChanged void
RaiseOffsetChanged void
RaiseUIAScrollBarSet void
RaiseViewportChangedEvent void
RaiseVisibilityChangedEvent void
ScrollInDirection void

Public Methods

Method Description
GetHorizontalScrollBarVisibility ( DependencyObject element ) : ScrollBarVisibility

Gets the value of the HorizontalScrollBarVisibility dependency property from a given element.

GetVerticalScrollBarVisibility ( DependencyObject element ) : ScrollBarVisibility

Gets the value of the VerticalScrollBarVisibility dependency property from a given element.

InvalidateScrollInfo ( ) : void
OnApplyTemplate ( ) : void
ScrollToHorizontalOffset ( double offset ) : void

Scrolls the content within the ScrollViewer to the specified horizontal offset position.

ScrollToVerticalOffset ( double offset ) : void

Scrolls the content within the ScrollViewer to the specified vertical offset position.

ScrollViewer ( ) : System

Initializes a new instance of the ScrollViewer class.

SetHorizontalScrollBarVisibility ( DependencyObject element, ScrollBarVisibility horizontalScrollBarVisibility ) : void

Sets the value of the HorizontalScrollBarVisibility dependency property to a given element.

SetScrollOffset ( Orientation orientation, double value ) : void
SetVerticalScrollBarVisibility ( DependencyObject element, ScrollBarVisibility verticalScrollBarVisibility ) : void

Sets the value of the VerticalScrollBarVisibility dependency property to a given element.

UpdateScrollBar ( Orientation orientation, double value ) : void
UpdateScrollbarVisibility ( ) : void

Protected Methods

Method Description
OnCreateAutomationPeer ( ) : AutomationPeer
OnKeyDown ( KeyEventArgs e ) : void

Responds to the KeyDown event.

OnMouseLeftButtonDown ( MouseButtonEventArgs e ) : void

Called when the user presses the left mouse button over the ListBoxItem.

OnMouseWheel ( MouseWheelEventArgs e ) : void

Private Methods

Method Description
HandleScroll ( Orientation orientation, ScrollEventArgs e ) : void

Handles the ScrollBar.Scroll event and updates the UI.

MeasureOverride ( Size availableSize ) : Size
OnScrollBarVisibilityChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Called when the HorizontalScrollBarVisibility/VerticalScrollBarVisibility property has changed.

OnScrollInfoDependencyPropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void
RaiseOffsetChanged ( double offset, AutomationOrientation orientation ) : void
RaiseUIAScrollBarSet ( AutomationOrientation orientation, ScrollBar oldValue, ScrollBar newValue ) : void
RaiseViewportChangedEvent ( double viewportWidth, double viewportHeight ) : void
RaiseVisibilityChangedEvent ( Visibility visibility, AutomationOrientation orientation ) : void
ScrollInDirection ( Key key ) : void

Scrolls the view in the specified direction.

Similar to WPF's corresponding ScrollViewer method.

Method Details

GetHorizontalScrollBarVisibility() public static method

Gets the value of the HorizontalScrollBarVisibility dependency property from a given element.
public static GetHorizontalScrollBarVisibility ( DependencyObject element ) : ScrollBarVisibility
element DependencyObject The element from which the property value is read.
return ScrollBarVisibility

GetVerticalScrollBarVisibility() public static method

Gets the value of the VerticalScrollBarVisibility dependency property from a given element.
public static GetVerticalScrollBarVisibility ( DependencyObject element ) : ScrollBarVisibility
element DependencyObject The element from which the property value is read.
return ScrollBarVisibility

InvalidateScrollInfo() public method

public InvalidateScrollInfo ( ) : void
return void

OnApplyTemplate() public method

public OnApplyTemplate ( ) : void
return void

OnCreateAutomationPeer() protected method

protected OnCreateAutomationPeer ( ) : AutomationPeer
return AutomationPeer

OnKeyDown() protected method

Responds to the KeyDown event.
protected OnKeyDown ( KeyEventArgs e ) : void
e KeyEventArgs Provides data for KeyEventArgs.
return void

OnMouseLeftButtonDown() protected method

Called when the user presses the left mouse button over the ListBoxItem.
protected OnMouseLeftButtonDown ( MouseButtonEventArgs e ) : void
e MouseButtonEventArgs The event data.
return void

OnMouseWheel() protected method

protected OnMouseWheel ( MouseWheelEventArgs e ) : void
e MouseWheelEventArgs
return void

ScrollToHorizontalOffset() public method

Scrolls the content within the ScrollViewer to the specified horizontal offset position.
public ScrollToHorizontalOffset ( double offset ) : void
offset double The position that the content scrolls to.
return void

ScrollToVerticalOffset() public method

Scrolls the content within the ScrollViewer to the specified vertical offset position.
public ScrollToVerticalOffset ( double offset ) : void
offset double The position that the content scrolls to.
return void

ScrollViewer() public method

Initializes a new instance of the ScrollViewer class.
public ScrollViewer ( ) : System
return System

SetHorizontalScrollBarVisibility() public static method

Sets the value of the HorizontalScrollBarVisibility dependency property to a given element.
public static SetHorizontalScrollBarVisibility ( DependencyObject element, ScrollBarVisibility horizontalScrollBarVisibility ) : void
element DependencyObject The element on which to set the property value.
horizontalScrollBarVisibility ScrollBarVisibility The property value to set.
return void

SetScrollOffset() public method

public SetScrollOffset ( Orientation orientation, double value ) : void
orientation Orientation
value double
return void

SetVerticalScrollBarVisibility() public static method

Sets the value of the VerticalScrollBarVisibility dependency property to a given element.
public static SetVerticalScrollBarVisibility ( DependencyObject element, ScrollBarVisibility verticalScrollBarVisibility ) : void
element DependencyObject The element on which to set the property value.
verticalScrollBarVisibility ScrollBarVisibility The property value to set.
return void

UpdateScrollBar() public method

public UpdateScrollBar ( Orientation orientation, double value ) : void
orientation Orientation
value double
return void

UpdateScrollbarVisibility() public method

public UpdateScrollbarVisibility ( ) : void
return void

Property Details

ComputedHorizontalScrollBarVisibilityProperty public static property

Identifies the ComputedHorizontalScrollBarVisibility dependency property.
public static DependencyProperty ComputedHorizontalScrollBarVisibilityProperty
return DependencyProperty

ComputedVerticalScrollBarVisibilityProperty public static property

Identifies the ComputedVerticalScrollBarVisibility dependency property.
public static DependencyProperty ComputedVerticalScrollBarVisibilityProperty
return DependencyProperty

ExtentHeightProperty public static property

Identifies the ViewportHeight dependency property.
public static DependencyProperty ExtentHeightProperty
return DependencyProperty

ExtentWidthProperty public static property

Identifies the ExtentWidth dependency property.
public static DependencyProperty ExtentWidthProperty
return DependencyProperty

HorizontalOffsetProperty public static property

Identifies the HorizontalOffset dependency property.
public static DependencyProperty HorizontalOffsetProperty
return DependencyProperty

HorizontalScrollBarVisibilityProperty public static property

Identifies the HorizontalScrollBarVisibility dependency property.
public static DependencyProperty HorizontalScrollBarVisibilityProperty
return DependencyProperty

ScrollableHeightProperty public static property

Identifies the ScrollableHeight dependency property.
public static DependencyProperty ScrollableHeightProperty
return DependencyProperty

ScrollableWidthProperty public static property

Identifies the ScrollableWidth dependency property.
public static DependencyProperty ScrollableWidthProperty
return DependencyProperty

VerticalOffsetProperty public static property

Identifies the VerticalOffset dependency property.
public static DependencyProperty VerticalOffsetProperty
return DependencyProperty

VerticalScrollBarVisibilityProperty public static property

Identifies the VerticalScrollBarVisibility dependency property.
public static DependencyProperty VerticalScrollBarVisibilityProperty
return DependencyProperty

ViewportHeightProperty public static property

Identifies the ViewportHeight dependency property.
public static DependencyProperty ViewportHeightProperty
return DependencyProperty

ViewportWidthProperty public static property

Identifies the ViewportWidth dependency property.
public static DependencyProperty ViewportWidthProperty
return DependencyProperty