Table of Contents

Class RefreshContainer

Namespace
Avalonia.Controls
Assembly
Avalonia.Controls.dll

Represents a container control that provides a RefreshVisualizer and pull-to-refresh functionality for scrollable content.

public class RefreshContainer : ContentControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
Inheritance
RefreshContainer
Implements
Inherited Members
Extension Methods

Constructors

RefreshContainer()

public RefreshContainer()

Fields

PullDirectionProperty

Defines the PullDirection event.

public static readonly StyledProperty<PullDirection> PullDirectionProperty

Field Value

StyledProperty<PullDirection>

RefreshRequestedEvent

Defines the RefreshRequested event.

public static readonly RoutedEvent<RefreshRequestedEventArgs> RefreshRequestedEvent

Field Value

RoutedEvent<RefreshRequestedEventArgs>

VisualizerProperty

Defines the Visualizer event.

public static readonly DirectProperty<RefreshContainer, RefreshVisualizer?> VisualizerProperty

Field Value

DirectProperty<RefreshContainer, RefreshVisualizer>

Properties

PullDirection

Gets or sets a value that specifies the direction to pull to initiate a refresh.

public PullDirection PullDirection { get; set; }

Property Value

PullDirection

Visualizer

Gets or sets the RefreshVisualizer for this container.

public RefreshVisualizer? Visualizer { get; set; }

Property Value

RefreshVisualizer

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 TemplateAppliedEventArgs

The event args.

OnPropertyChanged(AvaloniaPropertyChangedEventArgs)

Called when a avalonia property changes on the object.

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)

Parameters

change AvaloniaPropertyChangedEventArgs

The property change details.

RequestRefresh()

Initiates an update of the content.

public void RequestRefresh()

Events

RefreshRequested

Occurs when an update of the content has been initiated.

public event EventHandler<RefreshRequestedEventArgs>? RefreshRequested

Event Type

EventHandler<RefreshRequestedEventArgs>