SwipeItems Class

Definition

Represents a collection of SwipeItem objects.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[WebHostHidden]
class SwipeItems : DependencyObject, IIterable<SwipeItem>, IVector<SwipeItem>
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class SwipeItems : DependencyObject, IIterable<SwipeItem>, IVector<SwipeItem>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public class SwipeItems : DependencyObject, IEnumerable<SwipeItem>, IList<SwipeItem>
function SwipeItems()
Public Class SwipeItems
Inherits DependencyObject
Implements IEnumerable(Of SwipeItem), IList(Of SwipeItem)
<SwipeControl>
  <SwipeControl.TopItems>
    oneOrMoreSwipeItemDefinitions
  </SwipeControl.TopItems>
</SwipeControl>
Inheritance
Object IInspectable DependencyObject SwipeItems
Attributes
Implements

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)

Examples

Tip

For more info, design guidance, and code examples, see Swipe.

If you have the WinUI 2 Gallery app installed, click here to open the app and see the SwipeControl in action.

Constructors

SwipeItems()

Initializes a new instance of the SwipeItems class.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.-ctor (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Properties

Dispatcher

Gets the CoreDispatcher that this object is associated with. The CoreDispatcher represents a facility that can access the DependencyObject on the UI thread even if the code is initiated by a non-UI thread.

(Inherited from DependencyObject)
Mode

Gets or sets a value that indicates the effect of a swipe interaction.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.Mode (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

ModeProperty

Identifies the Mode dependency property.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.ModeProperty (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Size

Gets the size (count) of the collection.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.Size (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Methods

Append(SwipeItem)

Adds a new item to the collection.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.Append (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

Clear()

Removes all items from the collection.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.Clear (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

ClearValue(DependencyProperty)

Clears the local value of a dependency property.

(Inherited from DependencyObject)
First()

Returns an iterator for the items in the collection.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.First (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

GetAnimationBaseValue(DependencyProperty)

Returns any base value established for a dependency property, which would apply in cases where an animation is not active.

(Inherited from DependencyObject)
GetAt(UInt32)

Returns the item located at the specified index.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.GetAt(UInt32) (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

GetMany(UInt32, SwipeItem[])

Retrieves multiple elements in a single pass through the iterator.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.GetMany (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

GetValue(DependencyProperty)

Returns the current effective value of a dependency property from a DependencyObject.

(Inherited from DependencyObject)
GetView()

Gets an immutable view into the collection.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.GetView (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

IndexOf(SwipeItem, UInt32)

Retrieves the index of the specified item.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.IndexOf (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

InsertAt(UInt32, SwipeItem)

Inserts the specified item at the specified index.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.InsertAt (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

ReadLocalValue(DependencyProperty)

Returns the local value of a dependency property, if a local value is set.

(Inherited from DependencyObject)
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback)

Registers a notification function for listening to changes to a specific DependencyProperty on this DependencyObject instance.

(Inherited from DependencyObject)
RemoveAt(UInt32)

Removes the item at the specified index.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.RemoveAt(UInt32) (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

RemoveAtEnd()

Removes the last item in the collection.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.RemoveAtEnd (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

ReplaceAll(SwipeItem[])

Initially clears the collection, then inserts the provided array as new items.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.ReplaceAll (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

SetAt(UInt32, SwipeItem)

Sets the value at the specified index to the value specified.

Equivalent WinUI 2 API for UWP: Microsoft.UI.Xaml.Controls.SwipeItems.SetAt (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

SetValue(DependencyProperty, Object)

Sets the local value of a dependency property on a DependencyObject.

(Inherited from DependencyObject)
UnregisterPropertyChangedCallback(DependencyProperty, Int64)

Cancels a change notification that was previously registered by calling RegisterPropertyChangedCallback.

(Inherited from DependencyObject)

Applies to