Windows Dev Center

ItemsControl.ItemsPanel property

Gets or sets the template that defines the panel that controls the layout of items.

Syntax


public ItemsPanelTemplate ItemsPanel { get; set; }


<itemsControl>
  <itemsControl.ItemsPanel>
    singlePanelTemplate
  </itemsControl.ItemsPanel>
</itemsControl>


<itemsControl ItemsPanel="resourceReferenceToPanelTemplate"/>

XAML Values

singlePanelTemplate

A single ItemsPanelTemplate object element. That ItemsPanelTemplate would typically have multiple child elements that define the panel layout.

resourceReferenceToPanelTemplate

A resource reference to an existing ItemsPanelTemplate from a resources collection. The resource reference must specify the desired ItemsPanelTemplate by key.

Property value

Type: ItemsPanelTemplate

An ItemsPanelTemplate that defines the panel to use for the layout of the items. The default value for the ItemsControl is an ItemsPanelTemplate that specifies a StackPanel.

Remarks

Caution  ComboBox uses a CarouselPanel as its ItemsPanel. Using a different panel as the ItemsPanel of ComboBox is not supported and might result in undesired behavior.

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

ItemsControl

 

 

Show:
© 2015 Microsoft