Table of Contents

Class SillListViewButtonItem

Namespace
WindowSill.API
Assembly
WindowSill.API.dll

Represents a list view item that displays an interactive button with optional preview flyout content.

[WinRTRuntimeClassName("Microsoft.UI.Xaml.IUIElementOverrides")]
[WinRTExposedType(typeof(WindowSill_API_PreviewFlyoutWinRTTypeDetails))]
[Bindable]
public class SillListViewButtonItem : SillListViewItem, IEquatable<DependencyObject>, IAnimationObject, IVisualElement, IVisualElement2, IEquatable<UIElement>, IEquatable<FrameworkElement>, IEquatable<Control>, IWinRTObject, IUnmanagedVirtualMethodTableProvider, IDynamicInterfaceCastable, IEquatable<ContentControl>
Inheritance
SillListViewButtonItem
Implements
IWinRTObject
Inherited Members
Extension Methods

Constructors

SillListViewButtonItem()

Initializes a new instance of SillListViewButtonItem with no content or action.

public SillListViewButtonItem()

SillListViewButtonItem(IAsyncRelayCommand)

Initializes a new instance of SillListViewButtonItem with an async relay command.

public SillListViewButtonItem(IAsyncRelayCommand buttonAction)

Parameters

buttonAction IAsyncRelayCommand

The command to execute when the button is clicked.

SillListViewButtonItem(IconElement, object?, IAsyncRelayCommand)

Initializes a new instance of SillListViewButtonItem with an icon element, preview content, and an async relay command.

public SillListViewButtonItem(IconElement icon, object? previewFlyoutContent, IAsyncRelayCommand buttonAction)

Parameters

icon IconElement

The icon element to display as the button's content.

previewFlyoutContent object

Optional content to display in a preview flyout.

buttonAction IAsyncRelayCommand

The command to execute when the button is clicked.

SillListViewButtonItem(IconElement, object?, Func<Task>)

Initializes a new instance of SillListViewButtonItem with an icon element, preview content, and a button action.

public SillListViewButtonItem(IconElement icon, object? previewFlyoutContent, Func<Task> buttonAction)

Parameters

icon IconElement

The icon element to display as the button's content.

previewFlyoutContent object

Optional content to display in a preview flyout.

buttonAction Func<Task>

The asynchronous function to execute when the button is clicked.

SillListViewButtonItem(FrameworkElement, object?, IAsyncRelayCommand)

Initializes a new instance of SillListViewButtonItem with a framework element, preview content, and an async relay command.

public SillListViewButtonItem(FrameworkElement content, object? previewFlyoutContent, IAsyncRelayCommand buttonAction)

Parameters

content FrameworkElement

The framework element to display as the button's content.

previewFlyoutContent object

Optional content to display in a preview flyout.

buttonAction IAsyncRelayCommand

The command to execute when the button is clicked.

SillListViewButtonItem(FrameworkElement, object?, Func<Task>)

Initializes a new instance of SillListViewButtonItem with a framework element, preview content, and a button action.

public SillListViewButtonItem(FrameworkElement content, object? previewFlyoutContent, Func<Task> buttonAction)

Parameters

content FrameworkElement

The framework element to display as the button's content.

previewFlyoutContent object

Optional content to display in a preview flyout.

buttonAction Func<Task>

The asynchronous function to execute when the button is clicked.

SillListViewButtonItem(ImageSource, object?, IAsyncRelayCommand)

Initializes a new instance of SillListViewButtonItem with an image source, preview content, and an async relay command.

public SillListViewButtonItem(ImageSource iconSource, object? previewFlyoutContent, IAsyncRelayCommand buttonAction)

Parameters

iconSource ImageSource

The image source to display as the button's content.

previewFlyoutContent object

Optional content to display in a preview flyout.

buttonAction IAsyncRelayCommand

The command to execute when the button is clicked.

SillListViewButtonItem(ImageSource, object?, Func<Task>)

Initializes a new instance of SillListViewButtonItem with an image source, preview content, and a button action.

public SillListViewButtonItem(ImageSource iconSource, object? previewFlyoutContent, Func<Task> buttonAction)

Parameters

iconSource ImageSource

The image source to display as the button's content.

previewFlyoutContent object

Optional content to display in a preview flyout.

buttonAction Func<Task>

The asynchronous function to execute when the button is clicked.

SillListViewButtonItem(char, object?, IAsyncRelayCommand)

Initializes a new instance of SillListViewButtonItem with a glyph character, preview content, and an async relay command.

public SillListViewButtonItem(char glyph, object? previewFlyoutContent, IAsyncRelayCommand buttonAction)

Parameters

glyph char

The character glyph to display as the button's content.

previewFlyoutContent object

Optional content to display in a preview flyout.

buttonAction IAsyncRelayCommand

The command to execute when the button is clicked.

SillListViewButtonItem(char, object?, Func<Task>)

Initializes a new instance of SillListViewButtonItem with a glyph character, preview content, and a button action.

public SillListViewButtonItem(char glyph, object? previewFlyoutContent, Func<Task> buttonAction)

Parameters

glyph char

The character glyph to display as the button's content.

previewFlyoutContent object

Optional content to display in a preview flyout.

buttonAction Func<Task>

The asynchronous function to execute when the button is clicked.

SillListViewButtonItem(Func<Task>)

Initializes a new instance of SillListViewButtonItem with a button action delegate.

public SillListViewButtonItem(Func<Task> buttonAction)

Parameters

buttonAction Func<Task>

The asynchronous function to execute when the button is clicked.

SillListViewButtonItem(string, object?, IAsyncRelayCommand)

Initializes a new instance of SillListViewButtonItem with text content, preview content, and an async relay command.

public SillListViewButtonItem(string text, object? previewFlyoutContent, IAsyncRelayCommand buttonAction)

Parameters

text string

The text to display as the button's content.

previewFlyoutContent object

Optional content to display in a preview flyout.

buttonAction IAsyncRelayCommand

The command to execute when the button is clicked.

SillListViewButtonItem(string, object?, Func<Task>)

Initializes a new instance of SillListViewButtonItem with text content, preview content, and a button action.

public SillListViewButtonItem(string text, object? previewFlyoutContent, Func<Task> buttonAction)

Parameters

text string

The text to display as the button's content.

previewFlyoutContent object

Optional content to display in a preview flyout.

buttonAction Func<Task>

The asynchronous function to execute when the button is clicked.

Fields

CommandParameterProperty

Identifies the CommandParameter dependency property.

public static readonly DependencyProperty CommandParameterProperty

Field Value

DependencyProperty

CommandProperty

Identifies the Command dependency property.

public static readonly DependencyProperty CommandProperty

Field Value

DependencyProperty

Properties

Command

Gets or sets the asynchronous relay command that is executed when the button is clicked. This property supports data binding and can be null if no command is associated with the button.

public IAsyncRelayCommand? Command { get; set; }

Property Value

IAsyncRelayCommand

CommandParameter

Gets or sets the parameter passed to the command when it is executed. This property supports data binding and can be any object type.

public object? CommandParameter { get; set; }

Property Value

object

Methods

OnApplyTemplate()

protected override void OnApplyTemplate()

OnButtonClickAsync()

protected virtual Task OnButtonClickAsync()

Returns

Task