Table of Contents

Class ScrollbarPreviewBehavior

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

Displays a ToolTip next to the ScrollBar thumb while it is being dragged.
The original idea and code was taken from an MSDN sample - see http://code.msdn.microsoft.com/getwpfcode/Release/ProjectReleases.aspx?ReleaseId=1445 for the original source code and project.

public class ScrollbarPreviewBehavior : Behavior<ScrollBar>, IAnimatable, IAttachedObject
Inheritance
ScrollbarPreviewBehavior
Implements
Inherited Members
Extension Methods

Fields

IsEnabledProperty

This property allows the behavior to be used as a traditional attached property behavior.

public static DependencyProperty IsEnabledProperty

Field Value

DependencyProperty

ScrollingPreviewTemplateProperty

Specifies a ContentTemplate for a ToolTip that will appear next to the ScrollBar while dragging the thumb.

public static readonly DependencyProperty ScrollingPreviewTemplateProperty

Field Value

DependencyProperty

Properties

ScrollingPreviewTemplate

Gets/Sets the vertical scrolling preview template

public DataTemplate ScrollingPreviewTemplate { get; set; }

Property Value

DataTemplate

Methods

GetIsEnabled(ScrollBar)

Returns whether NumericTextBoxBehavior is enabled via attached property

public static bool GetIsEnabled(ScrollBar textBox)

Parameters

textBox ScrollBar

Returns

bool

True/FalseB

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.

SetIsEnabled(ScrollBar, bool)

Adds NumericTextBoxBehavior to TextBox

public static void SetIsEnabled(ScrollBar textBox, bool value)

Parameters

textBox ScrollBar

TextBox to apply

value bool

True/False