Table of Contents

Class ViewportSynchronizerBehavior

Namespace
HeBianGu.Base.WpfBase
Assembly
HeBianGu.Base.WpfBase.dll

This behavior allows a ViewModel to monitor and control the scrolling position of any ScrollViewer or control with a ScrollViewer in the template. It can also be used to synchronize two scrolling items against a single property in a ViewModel.

public class ViewportSynchronizerBehavior : Behavior<Control>, IAnimatable, IAttachedObject
Inheritance
ViewportSynchronizerBehavior
Implements
Inherited Members
Extension Methods

Fields

HorizontalOffsetProperty

Horizontal offset of the scroll viewer

public static readonly DependencyProperty HorizontalOffsetProperty

Field Value

DependencyProperty

VerticalOffsetProperty

Vertical offset of the scroll viewer

public static readonly DependencyProperty VerticalOffsetProperty

Field Value

DependencyProperty

ViewportHeightProperty

Vertical height of the scroll viewer

public static readonly DependencyProperty ViewportHeightProperty

Field Value

DependencyProperty

ViewportWidthProperty

Horizontal width of the scroll viewer

public static readonly DependencyProperty ViewportWidthProperty

Field Value

DependencyProperty

Properties

HorizontalOffset

The horizontal offset

public double HorizontalOffset { get; set; }

Property Value

double

VerticalOffset

The vertical offset

public double VerticalOffset { get; set; }

Property Value

double

ViewportHeight

The vertical height of the scrollviewer

public double ViewportHeight { get; set; }

Property Value

double

ViewportWidth

The horizontal width of the scrollviewer

public double ViewportWidth { get; set; }

Property Value

double

Methods

OnAttached()

Called after the behavior is attached to an AssociatedObject.

protected override void OnAttached()

Remarks

Override this to hook up functionality to the AssociatedObject.

OnDetaching()

Called when the behavior is being detached from its AssociatedObject, but before it has actually occurred.

protected override void OnDetaching()

Remarks

Override this to unhook functionality from the AssociatedObject.