GroupStyle.Panel property

Applies to Windows and Windows Phone

Gets or sets a template that creates the panel used to lay out the items.

Syntax


public ItemsPanelTemplate Panel { get; set; }


<GroupStyle Panel="itemsPanelTemplateReference" />


<GroupStyle>
  <GroupStyle.Panel>
    singleItemsPanelTemplate
  </GroupStyle.Panel>
</GroupStyle>  

XAML Values

itemsPanelTemplateReference

A reference to an existing ItemsPanelTemplate. Typically this is a keyed resource, which you reference through StaticResource.

singleItemsPanelTemplate

A single ItemsPanelTemplate object element defined inline, which declares the items template for the view.

Property value

Type: ItemsPanelTemplate

An ItemsPanelTemplate object that creates the panel used to layout the items.

Remarks

An ItemsPanelTemplate object element should contain exactly one FrameworkElement-derived class that serves as the root element for items. In most cases this is a Panel-derived class. The expanded template serves as the parent for the realized items and there generally is more than one item. Therefore the XAML content property of the intended root element of an ItemsPanelTemplate should support a collection, as Panel.Children does.

Important  

The root element of the template declared for the ItemsPanelTemplate in the GroupStyle.Panel property cannot be a virtualizing panel. Virtualizing panels are defined as any type that derives from VirtualizingPanel, for example the VirtualizingStackPanel class.

Requirements

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

GroupStyle
How to group items in a list or grid

 

 

Show:
© 2014 Microsoft