Skip to main content

ListView

C# API / Fluence.Wpf.Controls

  • Assembly: Fluence.Wpf
  • Namespace: Fluence.Wpf.Controls
public class ListView : System.Windows.Controls.ListView

A Fluent Design styled list view with animated item states.

Base type: System.Windows.Controls.ListView (including inherited WPF and .NET members)

C# source

Constructors​

ListView​

public ListView()

Initializes a new instance of the ListView class and wires the loaded event for default group styling.

Properties​

CornerRadius​

public CornerRadius CornerRadius { get; set; }

Gets or sets the corner radius of the list view.

EmptyContent​

public object EmptyContent { get; set; }

Content displayed when the list has no items.

HoverHighlightEnabled​

public bool HoverHighlightEnabled { get; set; }

Gets or sets whether hover highlighting is enabled.

IsItemSelectable​

public bool IsItemSelectable { get; set; }

Gets or sets whether items can be selected and show hover/selection visuals. When false, rows are display-only; scrolling and item animations are unchanged.

ItemAnimationsEnabled​

public bool ItemAnimationsEnabled { get; set; }

Gets or sets whether item animations are enabled.

ItemsLayout​

public ListViewItemsLayout ItemsLayout { get; set; }

Gets or sets whether items run down the list one per row, or wrap across it as a grid.

Remarks: Grid swaps the items panel for a wrapping one, which is what WinUI's own GridView does with its ItemsWrapGrid. WPF ships no virtualizing wrap panel, so the grid layout gives up the virtualization the default vertical panel has; a very long grid is better served by a consumer-supplied panel through ItemsPanel, which this property leaves alone once set. The WPF View property is untouched: that one takes a GridView of columns, a different thing.

Methods​

AnimateRemove​

public void AnimateRemove(object item, Action? onCompleted)

Animates out the item and then calls the provided callback.

Parameter item: The item to remove from the list or bound IList after the exit animation.

Parameter onCompleted: An optional callback invoked after removal completes.

GetContainerForItemOverride​

protected override DependencyObject GetContainerForItemOverride()

Documentation inherited from the ListView API.

GetParentIsItemSelectable​

public static bool GetParentIsItemSelectable(DependencyObject element)

Gets whether the parent list allows item selection (for template triggers).

Parameter element: The item container that stores the mirrored selection state.

Returns: true when the parent list allows item selection; otherwise false.

IsItemItsOwnContainerOverride​

protected override bool IsItemItsOwnContainerOverride(object item)

Documentation inherited from the ListView API.

OnSelectionChanged​

protected override void OnSelectionChanged(SelectionChangedEventArgs e)

Documentation inherited from the ListView API.

PrepareContainerForItemOverride​

protected override void PrepareContainerForItemOverride(DependencyObject element, object item)

Documentation inherited from the ListView API.

SetParentIsItemSelectable​

public static void SetParentIsItemSelectable(DependencyObject element, bool value)

Sets the parent list's IsItemSelectable value on an item container for template triggers.

Parameter element: The item container that receives the mirrored selection state.

Parameter value: true when the parent list allows item selection; otherwise false.

Dependency property identifiers​

Use these identifiers with WPF property APIs. The matching CLR properties appear above when the control exposes them.

CornerRadiusProperty​

public static readonly DependencyProperty CornerRadiusProperty

Identifies the CornerRadius dependency property.

EmptyContentProperty​

public static readonly DependencyProperty EmptyContentProperty

Identifies the EmptyContent dependency property.

HoverHighlightEnabledProperty​

public static readonly DependencyProperty HoverHighlightEnabledProperty

Identifies the HoverHighlightEnabled dependency property.

IsItemSelectableProperty​

public static readonly DependencyProperty IsItemSelectableProperty

Identifies the IsItemSelectable dependency property.

ItemAnimationsEnabledProperty​

public static readonly DependencyProperty ItemAnimationsEnabledProperty

Identifies the ItemAnimationsEnabled dependency property.

ItemsLayoutProperty​

public static readonly DependencyProperty ItemsLayoutProperty

Identifies the ItemsLayout dependency property.

ParentIsItemSelectableProperty​

public static readonly DependencyProperty ParentIsItemSelectableProperty

Attached property mirrored from the parent ListView so item templates can use MultiDataTrigger (each condition must use a Binding, not Property, in WPF).