ItemsPanelTemplate class

Applies to Windows and Windows Phone

Specifies the panel that the ItemsPresenter creates for the layout of the items of an ItemsControl.

Inheritance

Object
  DependencyObject
    FrameworkTemplate
      ItemsPanelTemplate

Syntax


public sealed class ItemsPanelTemplate : FrameworkTemplate


<ItemsPanelTemplate ...>
  templateRootElement
</ItemsPanelTemplate>

XAML Values

templateRootElement

A single object element that derives from the FrameworkElement class.

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The ItemsPanelTemplate class has these types of members:

Constructors

The ItemsPanelTemplate class has these constructors.

ConstructorDescription
ItemsPanelTemplate Initializes a new instance of the ItemsPanelTemplate class.

 

Methods

The ItemsPanelTemplate class has these methods. It also inherits methods from the Object class.

MethodDescription
ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject)
SetValue Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject)

 

Properties

The ItemsPanelTemplate class has these properties.

PropertyAccess typeDescription

Dispatcher

Read-onlyGets 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)

 

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 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

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

FrameworkTemplate

 

 

Show:
© 2014 Microsoft