ListViewBase ListViewBase ListViewBase ListViewBase Class

Definition

Provides the infrastructure for the ListView and GridView classes.

public : class ListViewBase : Selector, IListViewBase, IListViewBase2, IListViewBase3, IListViewBase4, IListViewBase5, IListViewBase6, ISemanticZoomInformationpublic class ListViewBase : Selector, IListViewBase, IListViewBase2, IListViewBase3, IListViewBase4, IListViewBase5, IListViewBase6, ISemanticZoomInformationPublic Class ListViewBase Inherits Selector Implements IListViewBase, IListViewBase2, IListViewBase3, IListViewBase4, IListViewBase5, IListViewBase6, ISemanticZoomInformation// This API is not available in Javascript.
Inheritance
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited properties

Inherited events

Inherited methods

Remarks

For user interface purposes, ListViewBase should be thought of as an abstract base class. Use ListView or GridView instead. The main difference between ListView and GridView is that ListView has a vertical/portrait orientation and GridView has a horizontal/landscape orientation. For more info, see Adding ListView and GridView controls.

ListViewBase derived classes

ListViewBase is the parent class for GridView and ListView.

Constructors

ListViewBase() ListViewBase() ListViewBase() ListViewBase()

Provides base-class initialization behavior for classes that are derived from the ListViewBase class.

protected : ListViewBase()protected ListViewBase()Protected Sub New()// This API is not available in Javascript.

Properties

CanDragItems CanDragItems CanDragItems CanDragItems

Gets or sets a value that indicates whether items in the view can be dragged as data payload.

public : PlatForm::Boolean CanDragItems { get; set; }public bool CanDragItems { get; set; }Public ReadWrite Property CanDragItems As bool// This API is not available in Javascript.
<listViewBase CanDragItems="bool" />
Value
PlatForm::Boolean bool bool bool

True if items in the view can be dragged as data payload; otherwise, false. The default is false.

Remarks

Setting IsSwipeEnabled to false disables some default touch interactions, so it should be set to true when these interactions are needed. For example:

  • If item selection is enabled and you set IsSwipeEnabled to false, a user can deselect items by right-clicking with the mouse, but can't deselect an item with touch by using a swipe gesture.
  • If you set CanDragItems to true and IsSwipeEnabled to false, a user can drag items with the mouse, but not with touch.
  • If you set CanReorderItems to true and IsSwipeEnabled to false, a user can reorder items with the mouse, but not with touch.

CanDragItems can be set to false as part of visual states that are intended to prevent users from dragging items in views such as a GridView.

CanDragItems does not reflect transient states that might influence the ability to drag items, such as item population lag. The primary scenario where you might get the value of CanDragItems in code is to verify that dynamic templates or user-selectable options in your app UI have not changed the value since you last set it.

See Also

CanDragItemsProperty CanDragItemsProperty CanDragItemsProperty CanDragItemsProperty

Identifies the CanDragItems dependency property.

public : static DependencyProperty CanDragItemsProperty { get; }public static DependencyProperty CanDragItemsProperty { get; }Public Static ReadOnly Property CanDragItemsProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the CanDragItems dependency property.

CanReorderItems CanReorderItems CanReorderItems CanReorderItems

Gets or sets a value that indicates whether items in the view can be reordered through user interaction.

public : PlatForm::Boolean CanReorderItems { get; set; }public bool CanReorderItems { get; set; }Public ReadWrite Property CanReorderItems As bool// This API is not available in Javascript.
<listViewBase CanReorderItems="bool" />
Value
PlatForm::Boolean bool bool bool

True if items in the view can be reordered through user interaction; otherwise, false. The default is false.

Examples

Here's a GridView that contains 6 rectangles that a user can reorder by drag-and-drop.

<GridView MaxHeight="310" 
          AllowDrop="True" 
          CanReorderItems="True">
    <Rectangle Height="100" Width="100" Fill="Blue"/>
    <Rectangle Height="100" Width="100" Fill="Red"/>
    <Rectangle Height="100" Width="100" Fill="Yellow"/>
    <Rectangle Height="100" Width="100" Fill="Green"/>
    <Rectangle Height="100" Width="100" Fill="Gray"/>
    <Rectangle Height="100" Width="100" Fill="LightBlue"/>
</GridView>

Remarks

To enable users to reorder items using drag-and-drop interaction, you must set both the CanReorderItems and AllowDrop properties to true.

Built in reordering is not supported when items are grouped, or when a VariableSizedWrapGrid is used as the ItemsPanel.

Setting IsSwipeEnabled to false disables some default touch interactions, so it should be set to true when these interactions are needed. For example:

  • If item selection is enabled and you set IsSwipeEnabled to false, a user can deselect items by right-clicking with the mouse, but can't deselect an item with touch by using a swipe gesture.
  • If you set CanDragItems to true and IsSwipeEnabled to false, a user can drag items with the mouse, but not with touch.
  • If you set CanReorderItems to true and IsSwipeEnabled to false, a user can reorder items with the mouse, but not with touch. +
See Also

CanReorderItemsProperty CanReorderItemsProperty CanReorderItemsProperty CanReorderItemsProperty

Identifies the CanReorderItems dependency property.

public : static DependencyProperty CanReorderItemsProperty { get; }public static DependencyProperty CanReorderItemsProperty { get; }Public Static ReadOnly Property CanReorderItemsProperty As DependencyProperty// This API is not available in Javascript.

DataFetchSize DataFetchSize DataFetchSize DataFetchSize

Gets or sets the amount of data to fetch for virtualizing/prefetch operations.

public : double DataFetchSize { get; set; }public double DataFetchSize { get; set; }Public ReadWrite Property DataFetchSize As double// This API is not available in Javascript.
<listViewBase DataFetchSize="double" />
Value
double double double double

The amount of data to fetch per interval, in pages.

See Also

DataFetchSizeProperty DataFetchSizeProperty DataFetchSizeProperty DataFetchSizeProperty

Identifies the DataFetchSize dependency property.

public : static DependencyProperty DataFetchSizeProperty { get; }public static DependencyProperty DataFetchSizeProperty { get; }Public Static ReadOnly Property DataFetchSizeProperty As DependencyProperty// This API is not available in Javascript.

Footer Footer Footer Footer

Gets or sets the content for the list footer.

public : PlatForm::Object Footer { get; set; }public object Footer { get; set; }Public ReadWrite Property Footer As object// This API is not available in Javascript.
<listViewBase Footer="footerString"/>

Value
PlatForm::Object object object object

The content of the list footer. The default is null.

Remarks

By default, the footer is shown at the bottom for a ListView, and on the right for a GridView. If the FlowDirection property is set to RightToLeft, the footer is shown on the left for a GridView.

You can use a data template for the footer by setting the FooterTemplate property.

See Also

FooterProperty FooterProperty FooterProperty FooterProperty

Identifies the Footer dependency property.

public : static DependencyProperty FooterProperty { get; }public static DependencyProperty FooterProperty { get; }Public Static ReadOnly Property FooterProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Footer dependency property.

FooterTemplate FooterTemplate FooterTemplate FooterTemplate

Gets or sets the DataTemplate used to display the content of the view footer.

public : DataTemplate FooterTemplate { get; set; }public DataTemplate FooterTemplate { get; set; }Public ReadWrite Property FooterTemplate As DataTemplate// This API is not available in Javascript.
<listViewBase FooterTemplate="resourceReferenceToDataTemplate"/>
Value
DataTemplate DataTemplate DataTemplate DataTemplate

The template that specifies the visualization of the footer object. The default is null.

FooterTemplateProperty FooterTemplateProperty FooterTemplateProperty FooterTemplateProperty

Identifies the FooterTemplate dependency property.

public : static DependencyProperty FooterTemplateProperty { get; }public static DependencyProperty FooterTemplateProperty { get; }Public Static ReadOnly Property FooterTemplateProperty As DependencyProperty// This API is not available in Javascript.

FooterTransitions FooterTransitions FooterTransitions FooterTransitions

Gets or sets the collection of Transition style elements that apply to the view footer.

public : TransitionCollection FooterTransitions { get; set; }public TransitionCollection FooterTransitions { get; set; }Public ReadWrite Property FooterTransitions As TransitionCollection// This API is not available in Javascript.
<listViewBase>
  <listViewBase.FooterTransitions>
    <TransitionCollection>
      oneOrMoreTransitions
    </TransitionCollection>
  </listViewBase.FooterTransitions>
</listViewBase>
Value
TransitionCollection TransitionCollection TransitionCollection TransitionCollection

The collection of Transition style elements that apply to the list footer.

Remarks

Important

The XAML syntax for all properties that use a TransitionCollection value is unusual in that you must declare an explicit TransitionCollection object element as the value, and then provide object elements as child elements of TransitionCollection for each of the transition animations you want to use. For most other XAML collection properties you could omit the collection object element because it can be implicit, but properties that use TransitionCollection don't support the implicit collection usage. For more info on implicit collections and XAML, see XAML syntax guide.

Transition animations play a particular role in UI design of your app. The basic idea is that when there is a change or transition, the animation draws the attention of the user to the change.

See Also

FooterTransitionsProperty FooterTransitionsProperty FooterTransitionsProperty FooterTransitionsProperty

Identifies the FooterTransitions dependency property.

public : static DependencyProperty FooterTransitionsProperty { get; }public static DependencyProperty FooterTransitionsProperty { get; }Public Static ReadOnly Property FooterTransitionsProperty As DependencyProperty// This API is not available in Javascript.

Header Header Header Header

Gets or sets the content for the list header.

public : PlatForm::Object Header { get; set; }public object Header { get; set; }Public ReadWrite Property Header As object// This API is not available in Javascript.
<listViewBase Header="headerString"/>

Value
PlatForm::Object object object object

The content of the list header. The default value is null.

Examples

Here's a GridView header that contains a StackPanel with text and an image. This Extensible Application Markup Language (XAML) is a simplified version of the GridView used in GroupDetail page of the Microsoft Visual Studio Grid App template.

<GridView x:Name="itemGridView"
          Margin="0,-14,0,0"
          Padding="120,0,120,50"
          ItemsSource="{Binding Source={StaticResource itemsViewSource}}"
          ItemTemplate="{StaticResource Standard500x130ItemTemplate}">

    <GridView.Header>
        <StackPanel Width="480" Margin="0,4,14,0">
            <TextBlock Text="{Binding Subtitle}" Margin="0,0,18,20" 
                       Style="{StaticResource SubheaderTextStyle}" MaxHeight="60"/>
            <Image Source="{Binding Image}" Height="400" Margin="0,0,18,20" 
                   Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/>
            <TextBlock Text="{Binding Description}" Margin="0,0,18,0" 
                       Style="{StaticResource BodyTextStyle}"/>
        </StackPanel>
    </GridView.Header>
</GridView>

Remarks

By default, the header is shown at the top for a ListView, and on the left for a GridView. If the FlowDirection property is set to RightToLeft, the header is shown on the right for a GridView.

You can use a data template for the Header by setting the HeaderTemplate property.

See Also

HeaderProperty HeaderProperty HeaderProperty HeaderProperty

Identifies the Header dependency property.

public : static DependencyProperty HeaderProperty { get; }public static DependencyProperty HeaderProperty { get; }Public Static ReadOnly Property HeaderProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the Header dependency property.

HeaderTemplate HeaderTemplate HeaderTemplate HeaderTemplate

Gets or sets the DataTemplate used to display the content of the view header.

public : DataTemplate HeaderTemplate { get; set; }public DataTemplate HeaderTemplate { get; set; }Public ReadWrite Property HeaderTemplate As DataTemplate// This API is not available in Javascript.
<listViewBase HeaderTemplate="resourceReferenceToDataTemplate"/>
Value
DataTemplate DataTemplate DataTemplate DataTemplate

The template that specifies the visualization of the header object. The default is null.

See Also

HeaderTemplateProperty HeaderTemplateProperty HeaderTemplateProperty HeaderTemplateProperty

Identifies the HeaderTemplate dependency property.

public : static DependencyProperty HeaderTemplateProperty { get; }public static DependencyProperty HeaderTemplateProperty { get; }Public Static ReadOnly Property HeaderTemplateProperty As DependencyProperty// This API is not available in Javascript.

HeaderTransitions HeaderTransitions HeaderTransitions HeaderTransitions

Gets or sets the collection of Transition style elements that apply to the view header.

public : TransitionCollection HeaderTransitions { get; set; }public TransitionCollection HeaderTransitions { get; set; }Public ReadWrite Property HeaderTransitions As TransitionCollection// This API is not available in Javascript.
<listViewBase>
  <listViewBase.HeaderTransitions>
    <TransitionCollection>
      oneOrMoreTransitions
    </TransitionCollection>
  </listViewBase.HeaderTransitions>
</listViewBase>
Value
TransitionCollection TransitionCollection TransitionCollection TransitionCollection

The collection of Transition style elements that apply to the list header.

Remarks

Important

The XAML syntax for all properties that use a TransitionCollection value is unusual in that you must declare an explicit TransitionCollection object element as the value, and then provide object elements as child elements of TransitionCollection for each of the transition animations you want to use. For most other XAML collection properties you could omit the collection object element because it can be implicit, but properties that use TransitionCollection don't support the implicit collection usage. For more info on implicit collections and XAML, see XAML syntax guide.

Transition animations play a particular role in UI design of your app. The basic idea is that when there is a change or transition, the animation draws the attention of the user to the change.

See Also

HeaderTransitionsProperty HeaderTransitionsProperty HeaderTransitionsProperty HeaderTransitionsProperty

Identifies the HeaderTransitions dependency property.

public : static DependencyProperty HeaderTransitionsProperty { get; }public static DependencyProperty HeaderTransitionsProperty { get; }Public Static ReadOnly Property HeaderTransitionsProperty As DependencyProperty// This API is not available in Javascript.

IncrementalLoadingThreshold IncrementalLoadingThreshold IncrementalLoadingThreshold IncrementalLoadingThreshold

Gets or sets the threshold range that governs when the ListViewBase class will begin to prefetch more items.

public : double IncrementalLoadingThreshold { get; set; }public double IncrementalLoadingThreshold { get; set; }Public ReadWrite Property IncrementalLoadingThreshold As double// This API is not available in Javascript.
<listViewBase IncrementalLoadingThreshold="double" />
Value
double double double double

The loading threshold, in terms of pages.

Remarks

The meaning of the page count given for IncrementalLoadingThreshold is that the ListViewBase does not need to request more items via LoadMoreItemsAsync until the trigger condition (see IncrementalLoadingTrigger ) gets within the IncrementalLoadingThreshold page range. Setting a larger number (for instance 10 or more) represents a belief that the user might attempt to scroll through the list very quickly, and it is worthwhile devoting resources to loading more items as quickly as possible. Setting a smaller number (for instance 5 or less) represents a belief that the user will scroll through the list less quickly, and that the user's scroll rate will permit the items collection to catch up without being as resource intensive.

IncrementalLoadingThreshold and DataFetchSize both contribute to the possible resource load that is the result of prefetch operations.

See Also

IncrementalLoadingThresholdProperty IncrementalLoadingThresholdProperty IncrementalLoadingThresholdProperty IncrementalLoadingThresholdProperty

Identifies the IncrementalLoadingThreshold dependency property.

public : static DependencyProperty IncrementalLoadingThresholdProperty { get; }public static DependencyProperty IncrementalLoadingThresholdProperty { get; }Public Static ReadOnly Property IncrementalLoadingThresholdProperty As DependencyProperty// This API is not available in Javascript.

IncrementalLoadingTrigger IncrementalLoadingTrigger IncrementalLoadingTrigger IncrementalLoadingTrigger

Gets or sets a value that indicates the conditions for prefetch operations by the ListViewBase class.

public : IncrementalLoadingTrigger IncrementalLoadingTrigger { get; set; }public IncrementalLoadingTrigger IncrementalLoadingTrigger { get; set; }Public ReadWrite Property IncrementalLoadingTrigger As IncrementalLoadingTrigger// This API is not available in Javascript.
<listViewBase IncrementalLoadingTrigger="None" />
-or-
<listViewBase IncrementalLoadingTrigger="Edge" />
Value
IncrementalLoadingTrigger IncrementalLoadingTrigger IncrementalLoadingTrigger IncrementalLoadingTrigger

An enumeration value that indicates the conditions that trigger prefetch operations. The default is Edge.

See Also

IncrementalLoadingTriggerProperty IncrementalLoadingTriggerProperty IncrementalLoadingTriggerProperty IncrementalLoadingTriggerProperty

Identifies the IncrementalLoadingTrigger dependency property.

public : static DependencyProperty IncrementalLoadingTriggerProperty { get; }public static DependencyProperty IncrementalLoadingTriggerProperty { get; }Public Static ReadOnly Property IncrementalLoadingTriggerProperty As DependencyProperty// This API is not available in Javascript.

IsActiveView IsActiveView IsActiveView IsActiveView

Gets or sets a value that indicates whether the ListViewBase instance is the active view in its owning SemanticZoom.

public : PlatForm::Boolean IsActiveView { get; set; }public bool IsActiveView { get; set; }Public ReadWrite Property IsActiveView As bool// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

true if the ListViewBase is the active view; otherwise, false.

Remarks

You typically don't set this property in XAML or in app code. The property is set implicitly when the view is set as either the ZoomedInView or ZoomedOutView of a SemanticZoom control.

See Also

IsActiveViewProperty IsActiveViewProperty IsActiveViewProperty IsActiveViewProperty

Identifies the IsActiveView dependency property.

public : static DependencyProperty IsActiveViewProperty { get; }public static DependencyProperty IsActiveViewProperty { get; }Public Static ReadOnly Property IsActiveViewProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the IsActiveView dependency property.

IsItemClickEnabled IsItemClickEnabled IsItemClickEnabled IsItemClickEnabled

Gets or sets a value that indicates whether items in the view fire an ItemClick event in response to interaction.

public : PlatForm::Boolean IsItemClickEnabled { get; set; }public bool IsItemClickEnabled { get; set; }Public ReadWrite Property IsItemClickEnabled As bool// This API is not available in Javascript.
<listViewBase IsItemClickEnabled="bool" />
Value
PlatForm::Boolean bool bool bool

true if interaction fires an ItemClick event; otherwise, false. The default is false.

Remarks

By default, a user can select items in the view by tapping or clicking on them. You can change this behavior to make the user interaction fire a click event instead of triggering item selection.

If you set the IsItemClickEnabled property to true, you must set the SelectionMode property to ListViewSelectionMode.None. Handle the ItemClick event to respond to the user interaction.

See Also

IsItemClickEnabledProperty IsItemClickEnabledProperty IsItemClickEnabledProperty IsItemClickEnabledProperty

Identifies the IsItemClickEnabled dependency property.

public : static DependencyProperty IsItemClickEnabledProperty { get; }public static DependencyProperty IsItemClickEnabledProperty { get; }Public Static ReadOnly Property IsItemClickEnabledProperty As DependencyProperty// This API is not available in Javascript.

IsMultiSelectCheckBoxEnabled IsMultiSelectCheckBoxEnabled IsMultiSelectCheckBoxEnabled IsMultiSelectCheckBoxEnabled

Gets or sets a value that indicates whether a check box is shown to enable multi-selection.

public : PlatForm::Boolean IsMultiSelectCheckBoxEnabled { get; set; }public bool IsMultiSelectCheckBoxEnabled { get; set; }Public ReadWrite Property IsMultiSelectCheckBoxEnabled As bool// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

true if a check box is shown to enable multi-selection; otherwise, false.

IsMultiSelectCheckBoxEnabledProperty IsMultiSelectCheckBoxEnabledProperty IsMultiSelectCheckBoxEnabledProperty IsMultiSelectCheckBoxEnabledProperty

Get the identifier for the IsMultiSelectCheckBoxEnabled dependency property.

public : static DependencyProperty IsMultiSelectCheckBoxEnabledProperty { get; }public static DependencyProperty IsMultiSelectCheckBoxEnabledProperty { get; }Public Static ReadOnly Property IsMultiSelectCheckBoxEnabledProperty As DependencyProperty// This API is not available in Javascript.
See Also

IsSwipeEnabled IsSwipeEnabled IsSwipeEnabled IsSwipeEnabled

Gets or sets a value that indicates whether the view supports discrete input processing for a swipe interaction.

public : PlatForm::Boolean IsSwipeEnabled { get; set; }public bool IsSwipeEnabled { get; set; }Public ReadWrite Property IsSwipeEnabled As bool// This API is not available in Javascript.
<listViewBase IsSwipeEnabled="bool" .../>
Value
PlatForm::Boolean bool bool bool

true if discrete input processing for swipe interactions is enabled; otherwise, false. The default is true.

Remarks

Setting IsSwipeEnabled to false disables some default touch interactions, so it should be set to true when these interactions are needed. For example:

  • If item selection is enabled and you set IsSwipeEnabled to false, a user can deselect items by right-clicking with the mouse, but can't deselect an item with touch by using a swipe gesture.
  • If you set CanDragItems to true and IsSwipeEnabled to false, a user can drag items with the mouse, but not with touch.
  • If you set CanReorderItems to true and IsSwipeEnabled to false, a user can reorder items with the mouse, but not with touch.

You typically set IsSwipeEnabled to false to disable swipe animations when items in the view don't support interactions that use the swipe gesture, like deselecting, dragging, and reordering. Disabling the animation when it's not needed can improve the performance of your app.

See Also

IsSwipeEnabledProperty IsSwipeEnabledProperty IsSwipeEnabledProperty IsSwipeEnabledProperty

Identifies the IsSwipeEnabled dependency property.

public : static DependencyProperty IsSwipeEnabledProperty { get; }public static DependencyProperty IsSwipeEnabledProperty { get; }Public Static ReadOnly Property IsSwipeEnabledProperty As DependencyProperty// This API is not available in Javascript.

IsZoomedInView IsZoomedInView IsZoomedInView IsZoomedInView

Gets or sets a value that indicates whether the ListViewBase instance is the zoomed-in view in its owning SemanticZoom.

public : PlatForm::Boolean IsZoomedInView { get; set; }public bool IsZoomedInView { get; set; }Public ReadWrite Property IsZoomedInView As bool// This API is not available in Javascript.
Value
PlatForm::Boolean bool bool bool

true if the ListViewBase is the zoomed-in view; otherwise, false.

Remarks

You typically don't set this property in XAML or in app code. The property is set implicitly when the view is set as either the ZoomedInView or ZoomedOutView of a SemanticZoom control.

See Also

IsZoomedInViewProperty IsZoomedInViewProperty IsZoomedInViewProperty IsZoomedInViewProperty

Identifies the IsZoomedInView dependency property.

public : static DependencyProperty IsZoomedInViewProperty { get; }public static DependencyProperty IsZoomedInViewProperty { get; }Public Static ReadOnly Property IsZoomedInViewProperty As DependencyProperty// This API is not available in Javascript.

ReorderMode ReorderMode ReorderMode ReorderMode

Gets or sets the reorder behavior for a ListViewBase instance. When Enabled, unsorted and ungrouped lists can be reordered by user manipulation.

public : ListViewReorderMode ReorderMode { get; set; }public ListViewReorderMode ReorderMode { get; set; }Public ReadWrite Property ReorderMode As ListViewReorderMode// This API is not available in Javascript.
<listViewBase ReorderMode="Enabled"/>
-or-
<listViewBase ReorderMode="Disabled"/>
Value
ListViewReorderMode ListViewReorderMode ListViewReorderMode ListViewReorderMode

One of the ListViewReorderMode enumeration values. The default is Disabled.

ReorderModeProperty ReorderModeProperty ReorderModeProperty ReorderModeProperty

Identifies the ReorderMode dependency property.

public : static DependencyProperty ReorderModeProperty { get; }public static DependencyProperty ReorderModeProperty { get; }Public Static ReadOnly Property ReorderModeProperty As DependencyProperty// This API is not available in Javascript.
Value
DependencyProperty DependencyProperty DependencyProperty DependencyProperty

The identifier for the ReorderMode dependency property.

SelectedItems SelectedItems SelectedItems SelectedItems

Gets the currently selected items.

public : IVector<object> SelectedItems { get; }public IList<object> SelectedItems { get; }Public ReadOnly Property SelectedItems As IList<object>// This API is not available in Javascript.
Value
IVector<PlatForm::Object> IList<object> IList<object> IList<object>

A collection of the currently selected items. The default is an empty collection.

Remarks

When SelectionMode is Multiple or Extended, use the SelectedItems property to get the items that are selected. When SelectionMode is Single, use the Selector.SelectedItem property to get the item that's selected.

Starting in Windows 10, you can use the SelectRange and DeselectRange methods with the SelectedRanges property to make selections using ranges of indexes. This is a more efficient way to describe item selection than using SelectedItems, which requires the actual item object to be created for each selected item.

Note

If the ItemsSource implements IItemsRangeInfo, the SelectedItems collection is not updated based on selection in the list. Use the SelectedRanges property instead.

See Also

SelectedRanges SelectedRanges SelectedRanges SelectedRanges

Gets a collection of ItemIndexRange objects that describe the currently selected items in the list.

public : IVectorView<ItemIndexRange> SelectedRanges { get; }public IReadOnlyList<ItemIndexRange> SelectedRanges { get; }Public ReadOnly Property SelectedRanges As IReadOnlyList<ItemIndexRange>// This API is not available in Javascript.
Value
IVectorView<ItemIndexRange> IReadOnlyList<ItemIndexRange> IReadOnlyList<ItemIndexRange> IReadOnlyList<ItemIndexRange>

The collection of ItemIndexRange objects that describe the currently selected items in the list. The default is an empty collection.

Remarks

Each ItemIndexRange in the SelectedRanges collection describes a contiguous block of selected items. ItemIndexRange describes the selection by index, so item objects don't need to be created. This is a more efficient way to describe item selection than using SelectedItems, which requires the actual item object to be created for each selected item.

If your datasource performs data virtualization, you can use the SelectedRanges property with the SelectRange and DeselectRange methods to modify selection of items that have not been created yet.

Note

If the ItemsSource implements IItemsRangeInfo, the SelectedItems collection is not updated based on selection in the list. Use the SelectedRanges property instead.

See Also

SelectionMode SelectionMode SelectionMode SelectionMode

Gets or sets the selection behavior for a ListViewBase instance.

public : ListViewSelectionMode SelectionMode { get; set; }public ListViewSelectionMode SelectionMode { get; set; }Public ReadWrite Property SelectionMode As ListViewSelectionMode// This API is not available in Javascript.
<listViewBase SelectionMode="listViewSelectionModeMemberName" />
Value
ListViewSelectionMode ListViewSelectionMode ListViewSelectionMode ListViewSelectionMode

One of the ListViewSelectionMode enumeration values. The default is Single selection.

Remarks

By default, a user can select a single item in a view. You can set the SelectionMode property to a ListViewSelectionMode enumeration value to enable multi-selection or to disable selection. Here are the selection mode values.

None Item selection is disabled.
Single With no modifier keys:

  • A user can select a single item using the space bar, mouse click, or touch tap.
  • A user can deselect an item using a downward swipe gesture.
While pressing Ctrl:

  • A user can deselect the item by using the space bar, mouse click, or touch tap.
  • Using the arrow keys, a user can move focus independently of selection.
Multiple With no modifier keys:

  • A user can select multiple items using the space bar, mouse click, or touch tap to toggle selection on the focused item.
  • Using the arrow keys, a user can move focus independently of selection.
Extended With no modifier keys:

  • The behavior is the same as Single selection.
While pressing Ctrl:

  • A user can select multiple items using the space bar, mouse click, or touch tap to toggle selection on the focused item.
  • Using the arrow keys, a user can move focus independently of selection.
While pressing Shift:

  • A user can select multiple contiguous items by clicking or tapping the first item in the selection and then the last item in the selection.
  • Using the arrow keys, a user can create a contiguous selection starting with the item selected when Shift is pressed.

Note

Touch interactions are enabled only when IsSwipeEnabled is true.

If SelectionMode is None, and CanDragItems and CanReorderItems are false, you should set IsSwipeEnabled to false to improve app performance. See the IsSwipeEnabled property for more info.

When SelectionMode is Single, use the Selector.SelectedItem property to get the item that's selected. When SelectionMode is Multiple or Extended, use the SelectedItems property to get the items that are selected.

When item selection is disabled, you can make items respond to a user click like a button instead of being selected. To do this, set SelectionMode to None, the IsItemClickEnabled property to true, and handle the ItemClick event.

For more info and examples, see How to change the interaction mode.

See Also

SelectionModeProperty SelectionModeProperty SelectionModeProperty SelectionModeProperty

Identifies the SelectionMode dependency property.

public : static DependencyProperty SelectionModeProperty { get; }public static DependencyProperty SelectionModeProperty { get; }Public Static ReadOnly Property SelectionModeProperty As DependencyProperty// This API is not available in Javascript.

SemanticZoomOwner SemanticZoomOwner SemanticZoomOwner SemanticZoomOwner

Gets or sets the SemanticZoom instance that hosts the ListViewBase.

public : SemanticZoom SemanticZoomOwner { get; set; }public SemanticZoom SemanticZoomOwner { get; set; }Public ReadWrite Property SemanticZoomOwner As SemanticZoom// This API is not available in Javascript.
Value
SemanticZoom SemanticZoom SemanticZoom SemanticZoom

The SemanticZoom instance that hosts this view, or null if the view is not hosted in a SemanticZoom control.

Remarks

You don't set this property in Extensible Application Markup Language (XAML) or in your app code. The property is set implicitly when the view is set as either the ZoomedInView or ZoomedOutView of a SemanticZoom control.

See Also

SemanticZoomOwnerProperty SemanticZoomOwnerProperty SemanticZoomOwnerProperty SemanticZoomOwnerProperty

Identifies the SemanticZoomOwner dependency property.

public : static DependencyProperty SemanticZoomOwnerProperty { get; }public static DependencyProperty SemanticZoomOwnerProperty { get; }Public Static ReadOnly Property SemanticZoomOwnerProperty As DependencyProperty// This API is not available in Javascript.

ShowsScrollingPlaceholders ShowsScrollingPlaceholders ShowsScrollingPlaceholders ShowsScrollingPlaceholders

Gets or sets a value that indicates whether the view shows placeholder UI for items during scrolling.

public : PlatForm::Boolean ShowsScrollingPlaceholders { get; set; }public bool ShowsScrollingPlaceholders { get; set; }Public ReadWrite Property ShowsScrollingPlaceholders As bool// This API is not available in Javascript.
<listViewBase ShowsScrollingPlaceholders="bool" />
Value
PlatForm::Boolean bool bool bool

true if the view shows placeholder UI for items during scrolling; otherwise, false. The default is true.

ShowsScrollingPlaceholdersProperty ShowsScrollingPlaceholdersProperty ShowsScrollingPlaceholdersProperty ShowsScrollingPlaceholdersProperty

Identifies the ShowsScrollingPlaceholders dependency property.

public : static DependencyProperty ShowsScrollingPlaceholdersProperty { get; }public static DependencyProperty ShowsScrollingPlaceholdersProperty { get; }Public Static ReadOnly Property ShowsScrollingPlaceholdersProperty As DependencyProperty// This API is not available in Javascript.

SingleSelectionFollowsFocus SingleSelectionFollowsFocus SingleSelectionFollowsFocus SingleSelectionFollowsFocus

Gets or sets a value that indicates whether item selection changes when keyboard focus changes.

public : PlatForm::Boolean SingleSelectionFollowsFocus { get; set; }public bool SingleSelectionFollowsFocus { get; set; }Public ReadWrite Property SingleSelectionFollowsFocus As bool// This API is not available in Javascript.
<listViewBase SingleSelectionFollowsFocus="bool" />
Value
PlatForm::Boolean bool bool bool

true if item selection changes when keyboard focus changes; otherwise, false. The default is true.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

This property is ignored if the list view's SelectionMode property is not set to Single.

By default, when a list view is configured for single selection, when the user moves keyboard focus to an item, the focused item is also selected. For example, if keyboard focus is moved from the first item to the second item, the SelectedIndex property is updated from 0 to 1.

Set this property to false to let a user move focus without the item selection following. For example, if each selection change causes significant UI updates, you might prefer to let the user move focus to a non-adjacent item and then press enter to update selection.

Version compatibility

The SingleSelectionFollowsFocus property is not available prior to Windows 10, version 1607. If your app’s 'minimum platform version' setting in Microsoft Visual Studio is less than the 'introduced version' shown in the Requirements block later in this page, you must design and test your app to account for this. For more info, see Version adaptive code.

To avoid exceptions when your app runs on previous versions of Windows 10, do not set this property in XAML or use it without performing a runtime check. This example shows how to use the ApiInformation class to check for the presence of this property before you set it.

<ListView x:Name="listView1" Loaded="ListView_Loaded"/>
private void ListView_Loaded(object sender, RoutedEventArgs e)
{
    if (ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Controls.ListViewBase", "SingleSelectionFollowsFocus"))
    {
        listView1.SingleSelectionFollowsFocus = false;
    }
}

SingleSelectionFollowsFocusProperty SingleSelectionFollowsFocusProperty SingleSelectionFollowsFocusProperty SingleSelectionFollowsFocusProperty

Identifies the SingleSelectionFollowsFocus dependency property.

public : static DependencyProperty SingleSelectionFollowsFocusProperty { get; }public static DependencyProperty SingleSelectionFollowsFocusProperty { get; }Public Static ReadOnly Property SingleSelectionFollowsFocusProperty As DependencyProperty// This API is not available in Javascript.
Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Methods

CompleteViewChange() CompleteViewChange() CompleteViewChange() CompleteViewChange()

Changes related aspects of presentation when the overall view for a SemanticZoom changes.

public : void CompleteViewChange()public void CompleteViewChange()Public Function CompleteViewChange() As void// This API is not available in Javascript.

Remarks

Controls derived from ListViewBase typically have an associated ScrollViewer as part of their template. The ListViewBase implementation of CompleteViewChange perpetuates ScrollBarVisibility for any scroll bars across the views when the views change.

See Also

CompleteViewChangeFrom(SemanticZoomLocation, SemanticZoomLocation) CompleteViewChangeFrom(SemanticZoomLocation, SemanticZoomLocation) CompleteViewChangeFrom(SemanticZoomLocation, SemanticZoomLocation) CompleteViewChangeFrom(SemanticZoomLocation, SemanticZoomLocation)

Completes item-wise operations that are related to a view change when the ListViewBase instance is the source view and the new view is a potentially different implementing view.

public : void CompleteViewChangeFrom(SemanticZoomLocation source, SemanticZoomLocation destination)public void CompleteViewChangeFrom(SemanticZoomLocation source, SemanticZoomLocation destination)Public Function CompleteViewChangeFrom(source As SemanticZoomLocation, destination As SemanticZoomLocation) As void// This API is not available in Javascript.
Parameters
source
SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation

The view item as represented in the source view.

destination
SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation

The view item as represented in the destination view.

See Also

CompleteViewChangeTo(SemanticZoomLocation, SemanticZoomLocation) CompleteViewChangeTo(SemanticZoomLocation, SemanticZoomLocation) CompleteViewChangeTo(SemanticZoomLocation, SemanticZoomLocation) CompleteViewChangeTo(SemanticZoomLocation, SemanticZoomLocation)

Completes item-wise operations that are related to a view change when the ListViewBase instance is the destination view and the source view is a potentially different implementing view.

public : void CompleteViewChangeTo(SemanticZoomLocation source, SemanticZoomLocation destination)public void CompleteViewChangeTo(SemanticZoomLocation source, SemanticZoomLocation destination)Public Function CompleteViewChangeTo(source As SemanticZoomLocation, destination As SemanticZoomLocation) As void// This API is not available in Javascript.
Parameters
source
SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation

The view item as represented in the source view.

destination
SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation

The view item as represented in the destination view.

See Also

DeselectRange(ItemIndexRange) DeselectRange(ItemIndexRange) DeselectRange(ItemIndexRange) DeselectRange(ItemIndexRange)

Deselects a block of items described by the ItemIndexRange.

public : void DeselectRange(ItemIndexRange itemIndexRange)public void DeselectRange(ItemIndexRange itemIndexRange)Public Function DeselectRange(itemIndexRange As ItemIndexRange) As void// This API is not available in Javascript.
Parameters
itemIndexRange
ItemIndexRange ItemIndexRange ItemIndexRange ItemIndexRange

Information about the range of items, including the index of the first and last items in the range, and the number of items.

Examples

Here's how to deselect the first 9 items in a ListView named itemListView.

if (itemListView.SelectionMode == ListViewSelectionMode.Multiple ||
    itemListView.SelectionMode == ListViewSelectionMode.Extended)
{
    itemListView.DeselectRange(new ItemIndexRange(0, 9));
}

Remarks

SelectRange and DeselectRange provide a more efficient way to modify the selection than using the SelectedItems property. When you select items using index ranges, use the SelectedRanges property to get all selected ranges in the list.

When you call DeselectRange, all items in the specified range are deselected, regardless of their original selection state. You can deselect all items in a collection by using an ItemIndexRange with a FirstIndex value of 0 and a Length value equal to the number of items in the collection.

Note

If the ItemsSource implements IItemsRangeInfo, the SelectedItems collection is not updated based on selection in the list. Use the SelectedRanges property instead.

See Also

InitializeViewChange() InitializeViewChange() InitializeViewChange() InitializeViewChange()

Initializes the changes to related aspects of presentation (such as scrolling UI or state) when the overall view for a SemanticZoom is about to change.

public : void InitializeViewChange()public void InitializeViewChange()Public Function InitializeViewChange() As void// This API is not available in Javascript.

Remarks

Controls derived from ListViewBase typically have an associated ScrollViewer as part of their template. The ListViewBase implementation of InitializeViewChange stores ScrollBarVisibility for current scroll bars, so that values can be perpetuated across the views when the views change.

See Also

IsDragSource() IsDragSource() IsDragSource() IsDragSource()

Returns a value that indicates whether the list view is both the drag source and drop target in a drag-and-drop operation.

public : PlatForm::Boolean IsDragSource()public bool IsDragSource()Public Function IsDragSource() As bool// This API is not available in Javascript.
Returns
PlatForm::Boolean bool bool bool

true if the list view is both the drag source and drop target; otherwise, false.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Remarks

For more info, see Drag and drop.

Version compatibility

The IsDragSource method is not available prior to Windows 10, version 1607. If your app’s 'minimum platform version' setting in Microsoft Visual Studio is less than the 'introduced version' shown in the Requirements block later in this page, you must design and test your app to account for this. For more info, see Version adaptive code.

To avoid exceptions when your app runs on previous versions of Windows 10, do not call this method without first performing a runtime check. This example shows how to use the ApiInformation class to check for the presence of this method before you use it.

if (ApiInformation.IsMethodPresent("Windows.UI.Xaml.Controls.ListViewBase", "IsDragSource"))
{
    bool isDragSource = listView1.IsDragSource();
}

LoadMoreItemsAsync() LoadMoreItemsAsync() LoadMoreItemsAsync() LoadMoreItemsAsync()

Initiates the asynchronous request to load more data items, in accordance with the active incremental loading settings.

public : IAsyncOperation<LoadMoreItemsResult> LoadMoreItemsAsync()public IAsyncOperation<LoadMoreItemsResult> LoadMoreItemsAsync()Public Function LoadMoreItemsAsync() As IAsyncOperation( Of LoadMoreItemsResult )// This API is not available in Javascript.
Returns
See Also

MakeVisible(SemanticZoomLocation) MakeVisible(SemanticZoomLocation) MakeVisible(SemanticZoomLocation) MakeVisible(SemanticZoomLocation)

Forces content in the view to scroll until the item that's specified by SemanticZoomLocation is visible. Also focuses the item if it finds the item.

public : void MakeVisible(SemanticZoomLocation item)public void MakeVisible(SemanticZoomLocation item)Public Function MakeVisible(item As SemanticZoomLocation) As void// This API is not available in Javascript.
Parameters

Remarks

You use the MakeVisible method to bring an item into view when the ListViewBase control is used as a view in a SemanticZoom control. To bring an item into view when the ListViewBase control is not used in a SemanticZoom, use the ScrollIntoView method instead.

See Also

PrepareConnectedAnimation(String, Object, String) PrepareConnectedAnimation(String, Object, String) PrepareConnectedAnimation(String, Object, String) PrepareConnectedAnimation(String, Object, String)

Returns a connected animation that's associated with the specified key, data item, and source element.

public : ConnectedAnimation PrepareConnectedAnimation(PlatForm::String key, PlatForm::Object item, PlatForm::String elementName)public ConnectedAnimation PrepareConnectedAnimation(String key, Object item, String elementName)Public Function PrepareConnectedAnimation(key As String, item As Object, elementName As String) As ConnectedAnimation// This API is not available in Javascript.
Parameters
key
PlatForm::String String String String

The key for the animation.

item
PlatForm::Object Object Object Object

The data item that is animated out of view.

elementName
PlatForm::String String String String

The name of the element in the ItemTemplate that provides the animated visual.

Returns
Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

ScrollIntoView(Object) ScrollIntoView(Object) ScrollIntoView(Object) ScrollIntoView(Object)

Scrolls the list to bring the specified data item into view.

public : void ScrollIntoView(PlatForm::Object item)public void ScrollIntoView(Object item)Public Function ScrollIntoView(item As Object) As void// This API is not available in Javascript.
Parameters
item
PlatForm::Object Object Object Object

The data item to bring into view.

Remarks

You use the ScrollIntoView method to bring an item into view when the ListViewBase control is not used as a view in a SemanticZoom control. To bring an item into view when the ListViewBase control is used in a SemanticZoom, use the MakeVisible method instead.

When the contents of the ItemsSource collection changes, particularly if many items are added to or removed from the collection, you might need to call UpdateLayout prior to calling ScrollIntoView for the specified item to scroll into the viewport.

See Also

ScrollIntoView(Object, ScrollIntoViewAlignment) ScrollIntoView(Object, ScrollIntoViewAlignment) ScrollIntoView(Object, ScrollIntoViewAlignment) ScrollIntoView(Object, ScrollIntoViewAlignment)

Scrolls the list to bring the specified data item into view with the specified alignment.

public : void ScrollIntoView(PlatForm::Object item, ScrollIntoViewAlignment alignment)public void ScrollIntoView(Object item, ScrollIntoViewAlignment alignment)Public Function ScrollIntoView(item As Object, alignment As ScrollIntoViewAlignment) As void// This API is not available in Javascript.
Parameters
item
PlatForm::Object Object Object Object

The data item to bring into view.

alignment
ScrollIntoViewAlignment ScrollIntoViewAlignment ScrollIntoViewAlignment ScrollIntoViewAlignment

An enumeration value that specifies whether the item uses Default or Leading alignment.

Remarks

You use the ScrollIntoView method to bring an item into view when the ListViewBase control is not used as a view in a SemanticZoom control. To bring an item into view when the ListViewBase control is used in a SemanticZoom, use the MakeVisible method instead.

When the contents of the ItemsSource collection changes, particularly if many items are added to or removed from the collection, you might need to call UpdateLayout prior to calling ScrollIntoView for the specified item to scroll into the viewport.

See Also

SelectAll() SelectAll() SelectAll() SelectAll()

Selects all the items in a view.

public : void SelectAll()public void SelectAll()Public Function SelectAll() As void// This API is not available in Javascript.

Examples

if (itemGridView->SelectionMode == ListViewSelectionMode::Multiple ||
    itemGridView->SelectionMode == ListViewSelectionMode::Extended)
{
    itemGridView->SelectAll();
}
if (itemGridView.SelectionMode == ListViewSelectionMode.Multiple ||
    itemGridView.SelectionMode == ListViewSelectionMode.Extended)
{
    itemGridView.SelectAll();
}
If itemGridView.SelectionMode = ListViewSelectionMode.Multiple OrElse
   itemGridView.SelectionMode = ListViewSelectionMode.Extended Then

   itemGridView.SelectAll()
End If

Remarks

Warning

Call the SelectAll method only when the SelectionMode property is set to Multiple or Extended. If you call SelectAll when the SelectionMode is Single or None, an exception is thrown.

Starting in Windows 10, you can use the SelectRange and DeselectRange methods with the SelectedRanges property to make selections using ranges of indexes. This is a more efficient way to describe item selection than using SelectedItems, which requires the actual item object to be created for each selected item. To select all items using index ranges, use SelectRange.

See Also

SelectRange(ItemIndexRange) SelectRange(ItemIndexRange) SelectRange(ItemIndexRange) SelectRange(ItemIndexRange)

Selects a block of items described by the ItemIndexRange.

public : void SelectRange(ItemIndexRange itemIndexRange)public void SelectRange(ItemIndexRange itemIndexRange)Public Function SelectRange(itemIndexRange As ItemIndexRange) As void// This API is not available in Javascript.
Parameters
itemIndexRange
ItemIndexRange ItemIndexRange ItemIndexRange ItemIndexRange

Information about the range of items, including the index of the first and last items in the range, and the number of items.

Examples

Here's how to select the first 9 items in a ListView named itemListView.

if (itemListView.SelectionMode == ListViewSelectionMode.Multiple ||
    itemListView.SelectionMode == ListViewSelectionMode.Extended)
{
    itemListView.SelectRange(new ItemIndexRange(0, 9));
}

Remarks

SelectRange and DeselectRange provide a more efficient way to modify the selection than using the SelectedItems property. When you select items using index ranges, use the SelectedRanges property to get all selected ranges in the list.

When you call SelectRange, all items in the specified range are selected, regardless of their original selection state. You can select all items in a collection by using an ItemIndexRange with a FirstIndex value of 0 and a Length value equal to the number of items in the collection.

Warning

Call the SelectRange method only when the SelectionMode property is set to Multiple or Extended. If you call SelectRange when the SelectionMode is Single or None, an exception is thrown.

Note

If the ItemsSource implements IItemsRangeInfo, the SelectedItems collection is not updated based on selection in the list. Use the SelectedRanges property instead.

See Also

SetDesiredContainerUpdateDuration(TimeSpan) SetDesiredContainerUpdateDuration(TimeSpan) SetDesiredContainerUpdateDuration(TimeSpan) SetDesiredContainerUpdateDuration(TimeSpan)

Sets the maximum target time between two render passes when a ListViewBase is updating its UI with data items during initial load or scrolling.

public : void SetDesiredContainerUpdateDuration(TimeSpan duration)public void SetDesiredContainerUpdateDuration(TimeSpan duration)Public Function SetDesiredContainerUpdateDuration(duration As TimeSpan) As void// This API is not available in Javascript.
Parameters
duration
TimeSpan TimeSpan TimeSpan TimeSpan

The maximum target time between two render passes.

StartViewChangeFrom(SemanticZoomLocation, SemanticZoomLocation) StartViewChangeFrom(SemanticZoomLocation, SemanticZoomLocation) StartViewChangeFrom(SemanticZoomLocation, SemanticZoomLocation) StartViewChangeFrom(SemanticZoomLocation, SemanticZoomLocation)

Initializes item-wise operations that are related to a view change when the ListViewBase instance is the source view and the pending destination view is a potentially different implementing view.

public : void StartViewChangeFrom(SemanticZoomLocation source, SemanticZoomLocation destination)public void StartViewChangeFrom(SemanticZoomLocation source, SemanticZoomLocation destination)Public Function StartViewChangeFrom(source As SemanticZoomLocation, destination As SemanticZoomLocation) As void// This API is not available in Javascript.
Parameters
source
SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation

The view item as represented in the source view.

destination
SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation

The view item as represented in the destination view.

See Also

StartViewChangeTo(SemanticZoomLocation, SemanticZoomLocation) StartViewChangeTo(SemanticZoomLocation, SemanticZoomLocation) StartViewChangeTo(SemanticZoomLocation, SemanticZoomLocation) StartViewChangeTo(SemanticZoomLocation, SemanticZoomLocation)

Initializes item-wise operations that are related to a view change when the source view is a different view and the pending destination view is the ListViewBase instance.

public : void StartViewChangeTo(SemanticZoomLocation source, SemanticZoomLocation destination)public void StartViewChangeTo(SemanticZoomLocation source, SemanticZoomLocation destination)Public Function StartViewChangeTo(source As SemanticZoomLocation, destination As SemanticZoomLocation) As void// This API is not available in Javascript.
Parameters
source
SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation

The view item as represented in the source view.

destination
SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation SemanticZoomLocation

The view item as represented in the destination view.

See Also

TryStartConnectedAnimationAsync(ConnectedAnimation, Object, String) TryStartConnectedAnimationAsync(ConnectedAnimation, Object, String) TryStartConnectedAnimationAsync(ConnectedAnimation, Object, String) TryStartConnectedAnimationAsync(ConnectedAnimation, Object, String)

Attempts to start the animation.

public : IAsyncOperation<PlatForm::Boolean> TryStartConnectedAnimationAsync(ConnectedAnimation animation, PlatForm::Object item, PlatForm::String elementName)public IAsyncOperation<bool> TryStartConnectedAnimationAsync(ConnectedAnimation animation, Object item, String elementName)Public Function TryStartConnectedAnimationAsync(animation As ConnectedAnimation, item As Object, elementName As String) As IAsyncOperation( Of bool )// This API is not available in Javascript.
Parameters
item
PlatForm::Object Object Object Object

The data item that is animated into view.

elementName
PlatForm::String String String String

The name of the element in the ItemTemplate that provides the animated visual.

Returns

true if the animation started; false if the animation has already been started, if it is no longer active, or if the destination element is the same as the source element.

Additional features and requirements
Device family
Windows 10 Creators Update (introduced v10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v4)

Events

ChoosingGroupHeaderContainer ChoosingGroupHeaderContainer ChoosingGroupHeaderContainer ChoosingGroupHeaderContainer

Occurs when an item container is to be chosen for a data group.

public : event TypedEventHandler ChoosingGroupHeaderContainer<ListViewBase,  ChoosingGroupHeaderContainerEventArgs>public event TypedEventHandler ChoosingGroupHeaderContainer<ListViewBase,  ChoosingGroupHeaderContainerEventArgs>Public Event ChoosingGroupHeaderContainer<ListViewBase,  ChoosingGroupHeaderContainerEventArgs>// This API is not available in Javascript.

Remarks

You typically handle this event to enable accessibility. The group headers do not have an accessible name set by default. This event provides access to the header instance and lets you to set the AutomationProperties.Name attached property to an appropriate value.

ChoosingItemContainer ChoosingItemContainer ChoosingItemContainer ChoosingItemContainer

Occurs when an item container is to be chosen for a data item.

public : event TypedEventHandler ChoosingItemContainer<ListViewBase,  ChoosingItemContainerEventArgs>public event TypedEventHandler ChoosingItemContainer<ListViewBase,  ChoosingItemContainerEventArgs>Public Event ChoosingItemContainer<ListViewBase,  ChoosingItemContainerEventArgs>// This API is not available in Javascript.

Remarks

This event is raised only if the list or grid's ItemsPanel is an ItemsStackPanel or ItemsWrapGrid. If you replace the ItemsPanel with another panel, the event is not raised.

ContainerContentChanging ContainerContentChanging ContainerContentChanging ContainerContentChanging

Occurs when the data item associated with a UI container changes.

public : event TypedEventHandler ContainerContentChanging<ListViewBase,  ContainerContentChangingEventArgs>public event TypedEventHandler ContainerContentChanging<ListViewBase,  ContainerContentChangingEventArgs>Public Event ContainerContentChanging<ListViewBase,  ContainerContentChangingEventArgs>// This API is not available in Javascript.
<listViewBase ContainerContentChanging="eventhandler" />

Remarks

This event is raised only if the list or grid's ItemsPanel is an ItemsStackPanel or ItemsWrapGrid. If you replace the ItemsPanel with another panel, the event is not raised.

For info and examples, see the Update ListView and GridView items incrementally section of Optimize ListView and GridView.

For more examples, download the XAML GridView grouping and SemanticZoom sample.

See Also

DragItemsCompleted DragItemsCompleted DragItemsCompleted DragItemsCompleted

Occurs when a drag operation that involves one of the items in the view is ended.

public : event TypedEventHandler DragItemsCompleted<ListViewBase,  DragItemsCompletedEventArgs>public event TypedEventHandler DragItemsCompleted<ListViewBase,  DragItemsCompletedEventArgs>Public Event DragItemsCompleted<ListViewBase,  DragItemsCompletedEventArgs>// This API is not available in Javascript.
See Also

DragItemsStarting DragItemsStarting DragItemsStarting DragItemsStarting

Occurs when a drag operation that involves one of the items in the view is initiated.

public : event DragItemsStartingEventHandler DragItemsStartingpublic event DragItemsStartingEventHandler DragItemsStartingPublic Event DragItemsStarting// This API is not available in Javascript.
<listViewBase DragItemsStarting="eventhandler" />

Remarks

This event occurs when you start a drag-and-drop operation, including when you perform a reorder operation by drag-and-drop. When you perform custom actions as a result of a drag-and-drop operation, you typically listen to this event and provide more data using the DragItemsStartingEventArgs.Data property.

You can inspect the items being dragged by checking the DragItemsStartingEventArgs.Items property.

You can cancel the drag operation by setting the DragItemsStartingEventArgs.Cancel property to true.

See Also

ItemClick ItemClick ItemClick ItemClick

Occurs when an item in the list view receives an interaction, and the IsItemClickEnabled property is true.

public : event ItemClickEventHandler ItemClickpublic event ItemClickEventHandler ItemClickPublic Event ItemClick// This API is not available in Javascript.
<listViewBase ItemClick="eventhandler" />

Remarks

If the list view is one of the views in a SemanticZoom, selection entails additional behavior that might change between the views. This behavior is built in to the ListViewBase class, not the@Windows.UI.Xaml.Controls.SemanticZoom?text=SemanticZoom class.

See Also

See Also