Printer Friendly Version      Send     
Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
Silverlight
ItemsControl Class
 ItemsPanel Property
Other versions are also available for the following:
.NET Framework Class Library for Silverlight
ItemsControl..::.ItemsPanel Property
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

Visual Basic (Declaration)
Public Property ItemsPanel As ItemsPanelTemplate
Visual Basic (Usage)
Dim instance As ItemsControl
Dim value As ItemsPanelTemplate

value = instance.ItemsPanel

instance.ItemsPanel = value
C#
public ItemsPanelTemplate ItemsPanel { get; set; }
Visual C++
public:
property ItemsPanelTemplate^ ItemsPanel {
    ItemsPanelTemplate^ get ();
    void set (ItemsPanelTemplate^ value);
}
JScript
public function get ItemsPanel () : ItemsPanelTemplate
public function set ItemsPanel (value : ItemsPanelTemplate)
XAML Property Element Usage
<object>
  <object.ItemsPanel>
    singlePanelTemplate
  </object.ItemsPanel>
</object>
XAML Attribute Usage
<object 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: System.Windows.Controls..::.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.

© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker