Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 3.5
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
.NET Framework Class Library
ItemsPresenter Class

Updated: November 2007

Used within the template of an item control to specify the place in the control’s visual tree where the ItemsPanel defined by the ItemsControl is to be added.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/xaml/presentation

Visual Basic (Declaration)
<LocalizabilityAttribute(LocalizationCategory.NeverLocalize)> _
Public Class ItemsPresenter _
    Inherits FrameworkElement
Visual Basic (Usage)
Dim instance As ItemsPresenter
C#
[LocalizabilityAttribute(LocalizationCategory.NeverLocalize)]
public class ItemsPresenter : FrameworkElement
Visual C++
[LocalizabilityAttribute(LocalizationCategory::NeverLocalize)]
public ref class ItemsPresenter : public FrameworkElement
J#
/** @attribute LocalizabilityAttribute(LocalizationCategory.NeverLocalize) */
public class ItemsPresenter extends FrameworkElement
JScript
public class ItemsPresenter extends FrameworkElement
XAML Object Element Usage
<ItemsPresenter .../>

The following example shows how to use an ItemsPresenter in a control template for a HeaderedItemsControl.

C#
<!--Define a control template for a HeaderedItemsControl-->
<Style TargetType="HeaderedItemsControl">
  <Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="{x:Type HeaderedItemsControl}">
        <StackPanel>
          <Grid>
            <Rectangle Fill="{TemplateBinding Background}"/>
            <ContentPresenter ContentSource="Header"/>
          </Grid>
          <Grid>
            <Rectangle Stroke="{TemplateBinding BorderBrush}"/>
            <ItemsPresenter Margin="2,0,0,0"/>
          </Grid>
        </StackPanel>
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>

System..::.Object
  System.Windows.Threading..::.DispatcherObject
    System.Windows..::.DependencyObject
      System.Windows.Media..::.Visual
        System.Windows..::.UIElement
          System.Windows..::.FrameworkElement
            System.Windows.Controls..::.ItemsPresenter
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows Vista

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
this info is useless.      Roman 544 ... Thomas Lee   |   Edit   |  
Just a single line of description for an important class WPF!
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker