Class ScrollBar
- Namespace
- Avalonia.Controls.Primitives
- Assembly
- Avalonia.Controls.dll
A scrollbar control.
[TemplatePart("PART_LineDownButton", typeof(Button))]
[TemplatePart("PART_LineUpButton", typeof(Button))]
[TemplatePart("PART_PageDownButton", typeof(Button))]
[TemplatePart("PART_PageUpButton", typeof(Button))]
[PseudoClasses(new string[] { ":vertical", ":horizontal" })]
public class ScrollBar : RangeBase, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
ScrollBar
- Implements
- Inherited Members
- Extension Methods
Constructors
ScrollBar()
Initializes a new instance of the ScrollBar class.
public ScrollBar()
Fields
AllowAutoHideProperty
Defines the AllowAutoHide property.
public static readonly StyledProperty<bool> AllowAutoHideProperty
Field Value
HideDelayProperty
Defines the HideDelay property.
public static readonly StyledProperty<TimeSpan> HideDelayProperty
Field Value
IsExpandedProperty
Defines the IsExpanded property.
public static readonly DirectProperty<ScrollBar, bool> IsExpandedProperty
Field Value
OrientationProperty
Defines the Orientation property.
public static readonly StyledProperty<Orientation> OrientationProperty
Field Value
ShowDelayProperty
Defines the ShowDelay property.
public static readonly StyledProperty<TimeSpan> ShowDelayProperty
Field Value
ViewportSizeProperty
Defines the ViewportSize property.
public static readonly StyledProperty<double> ViewportSizeProperty
Field Value
VisibilityProperty
Defines the Visibility property.
public static readonly StyledProperty<ScrollBarVisibility> VisibilityProperty
Field Value
Properties
AllowAutoHide
Gets a value that indicates whether the scrollbar can hide itself when user is not interacting with it.
public bool AllowAutoHide { get; set; }
Property Value
HideDelay
Gets a value that determines how long will be the hide delay after user stops interacting with the scrollbar.
public TimeSpan HideDelay { get; set; }
Property Value
IsExpanded
Gets a value that indicates whether the scrollbar is expanded.
public bool IsExpanded { get; }
Property Value
Orientation
Gets or sets the orientation of the scrollbar.
public Orientation Orientation { get; set; }
Property Value
ShowDelay
Gets a value that determines how long will be the show delay when user starts interacting with the scrollbar.
public TimeSpan ShowDelay { get; set; }
Property Value
ViewportSize
Gets or sets the amount of the scrollable content that is currently visible.
public double ViewportSize { get; set; }
Property Value
Visibility
Gets or sets a value that indicates whether the scrollbar should hide itself when it is not needed.
public ScrollBarVisibility Visibility { get; set; }
Property Value
Methods
OnApplyTemplate(TemplateAppliedEventArgs)
Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
Parameters
e
TemplateAppliedEventArgsThe event args.
OnAttachedToVisualTree(VisualTreeAttachmentEventArgs)
Called when the control is added to a rooted visual tree.
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
Parameters
e
VisualTreeAttachmentEventArgsThe event args.
OnCreateAutomationPeer()
Returns a new, type-specific AutomationPeer implementation for the control.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer
The type-specific AutomationPeer implementation.
OnKeyDown(KeyEventArgs)
Called before the KeyDown event occurs.
protected override void OnKeyDown(KeyEventArgs e)
Parameters
e
KeyEventArgsThe event args.
OnPointerEntered(PointerEventArgs)
Called before the PointerEntered event occurs.
protected override void OnPointerEntered(PointerEventArgs e)
Parameters
e
PointerEventArgsThe event args.
OnPointerExited(PointerEventArgs)
Called before the PointerExited event occurs.
protected override void OnPointerExited(PointerEventArgs e)
Parameters
e
PointerEventArgsThe event args.
OnPointerWheelChanged(PointerWheelEventArgs)
Called before the PointerWheelChanged event occurs.
protected override void OnPointerWheelChanged(PointerWheelEventArgs e)
Parameters
e
PointerWheelEventArgsThe event args.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.
OnScroll(ScrollEventType)
protected void OnScroll(ScrollEventType scrollEventType)
Parameters
scrollEventType
ScrollEventType
Events
Scroll
public event EventHandler<ScrollEventArgs>? Scroll