ItemsPresenter ItemsPresenter ItemsPresenter Class

Specifies where items are placed in a control, usually an ItemsControl.

Syntax

Declaration

public sealed class ItemsPresenterpublic sealed class ItemsPresenterPublic NotInheritable Class ItemsPresenter
<ItemsPresenter .../>

Inheritance Hierarchy

Inherited Members

Inherited properties

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Tag
Tag
Tag
, , , , , , , , , , , , , , , , , , , , , , , , ,

Inherited events

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Inherited methods

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Constructors summary

Initializes a new instance of the ItemsPresenter class.

Properties summary

Gets a value that indicates whether the horizontal snap points for the ItemsPresenter are equidistant from each other.

Gets a value that indicates whether the vertical snap points for the ItemsPresenter are equidistant from each other.

Gets or sets the content for the items footer.

Identifies the Footer dependency property.

Gets or sets the DataTemplate used to display the content of the items header.

Identifies the FooterTemplate dependency property.

Gets or sets the collection of Transition style elements that apply to the footer of an ItemsPresenter.

Identifies the FooterTransitions dependency property.

Gets or sets the content for the items header.

Identifies the Header dependency property.

Gets or sets the DataTemplate used to display the content of the items header.

Identifies the HeaderTemplate dependency property.

Gets or sets the collection of Transition style elements that apply to the header of an ItemsPresenter.

Identifies the HeaderTransitions dependency property.

Gets or sets the distance between the ItemsPresenter and its child objects.

Identifies the Padding dependency property.

Methods summary

Returns a read-only collection of numbers that represent the snap points for the specified orientation.

Returns an original offset and interval for equidistant snap points for the specified orientation.

Events summary

Occurs when the horizontal snap points change.

Occurs when the vertical snap points change.

Constructors

  • ItemsPresenter()
    ItemsPresenter()
    ItemsPresenter()
    ItemsPresenter()

    Initializes a new instance of the ItemsPresenter class.

    public ItemsPresenter()public New()Public Sub New()public ItemsPresenter()

Properties

  • AreHorizontalSnapPointsRegular
    AreHorizontalSnapPointsRegular
    AreHorizontalSnapPointsRegular
    AreHorizontalSnapPointsRegular

    Gets a value that indicates whether the horizontal snap points for the ItemsPresenter are equidistant from each other.

    public bool AreHorizontalSnapPointsRegular { get; }public bool AreHorizontalSnapPointsRegular { get; }Public ReadOnly Property AreHorizontalSnapPointsRegular As boolpublic bool AreHorizontalSnapPointsRegular { get; }

    Property Value

    • bool
      bool
      bool

      True if the horizontal snap points for the ItemsPresenter are equidistant from each other; otherwise, false.

  • AreVerticalSnapPointsRegular
    AreVerticalSnapPointsRegular
    AreVerticalSnapPointsRegular
    AreVerticalSnapPointsRegular

    Gets a value that indicates whether the vertical snap points for the ItemsPresenter are equidistant from each other.

    public bool AreVerticalSnapPointsRegular { get; }public bool AreVerticalSnapPointsRegular { get; }Public ReadOnly Property AreVerticalSnapPointsRegular As boolpublic bool AreVerticalSnapPointsRegular { get; }

    Property Value

    • bool
      bool
      bool

      True if the vertical snap points for the ItemsPresenter are equidistant from each other; otherwise, false.

  • FooterProperty
    FooterProperty
    FooterProperty
    FooterProperty

    Identifies the Footer dependency property.

    public static DependencyProperty FooterProperty { get; }public static DependencyProperty FooterProperty { get; }Public Static ReadOnly Property FooterProperty As DependencyPropertypublic static DependencyProperty FooterProperty { get; }

    Property Value

  • FooterTemplate
    FooterTemplate
    FooterTemplate
    FooterTemplate

    Gets or sets the DataTemplate used to display the content of the items header.

    public DataTemplate FooterTemplate { get; set; }public DataTemplate FooterTemplate { get; set; }Public ReadWrite Property FooterTemplate As DataTemplatepublic DataTemplate FooterTemplate { get; set; }
    <ItemsPresenter>
      <ItemsPresenter.FooterTemplate>
        singleDataTemplate
      </ItemsPresenter.FooterTemplate>
    </ItemsPresenter>
    

    Property Value

  • FooterTemplateProperty
    FooterTemplateProperty
    FooterTemplateProperty
    FooterTemplateProperty

    Identifies the FooterTemplate dependency property.

    public static DependencyProperty FooterTemplateProperty { get; }public static DependencyProperty FooterTemplateProperty { get; }Public Static ReadOnly Property FooterTemplateProperty As DependencyPropertypublic static DependencyProperty FooterTemplateProperty { get; }

    Property Value

  • FooterTransitions
    FooterTransitions
    FooterTransitions
    FooterTransitions

    Gets or sets the collection of Transition style elements that apply to the footer of an ItemsPresenter.

    public TransitionCollection FooterTransitions { get; set; }public TransitionCollection FooterTransitions { get; set; }Public ReadWrite Property FooterTransitions As TransitionCollectionpublic TransitionCollection FooterTransitions { get; set; }
    <ItemsPresenter>
      <ItemsPresenter.FooterTransitions>
        <TransitionCollection>
          oneOrMoreTransitions
        </TransitionCollection>
      </ItemsPresenter.FooterTransitions>
    </ItemsPresenter>
    

    Property Value

    Remarks

    Important

    The XAML syntax for all properties that use a TransitionCollection value is unusual in that you must declare an explicit TransitionCollection object element as the value, and then provide object elements as child elements of TransitionCollection for each of the transition animations you want to use. For most other XAML collection properties you could omit the collection object element because it can be implicit, but properties that use TransitionCollection don't support the implicit collection usage. For more info on implicit collections and XAML, see XAML syntax guide.

    Transition animations play a particular role in UI design of your app. The basic idea is that when there is a change or transition, the animation draws the attention of the user to the change.

  • FooterTransitionsProperty
    FooterTransitionsProperty
    FooterTransitionsProperty
    FooterTransitionsProperty

    Identifies the FooterTransitions dependency property.

    public static DependencyProperty FooterTransitionsProperty { get; }public static DependencyProperty FooterTransitionsProperty { get; }Public Static ReadOnly Property FooterTransitionsProperty As DependencyPropertypublic static DependencyProperty FooterTransitionsProperty { get; }

    Property Value

  • Header
    Header
    Header
    Header

    Gets or sets the content for the items header.

    public object Header { get; set; }public object Header { get; set; }Public ReadWrite Property Header As objectpublic object Header { get; set; }
    <ItemsPresenter Header="headerString"/>
    
    

    Property Value

    • object
      object
      object

      The content of the items header. The default value is null.

    Remarks

    You can set a data template for the Header by using the HeaderTemplate property.

    Windows 8.1 Header alignment is handled differently in apps compiled for Windows 8 than in apps compiled for Windows 8.1.+ In an app compiled for Windows 8, the header is always left-aligned when the orientation of the items is Horizontal, or top-aligned when the orientation is Vertical. VerticalAlignment and HorizontalAlignment values that you set are ignored.

  • HeaderProperty
    HeaderProperty
    HeaderProperty
    HeaderProperty

    Identifies the Header dependency property.

    public static DependencyProperty HeaderProperty { get; }public static DependencyProperty HeaderProperty { get; }Public Static ReadOnly Property HeaderProperty As DependencyPropertypublic static DependencyProperty HeaderProperty { get; }

    Property Value

  • HeaderTemplate
    HeaderTemplate
    HeaderTemplate
    HeaderTemplate

    Gets or sets the DataTemplate used to display the content of the items header.

    public DataTemplate HeaderTemplate { get; set; }public DataTemplate HeaderTemplate { get; set; }Public ReadWrite Property HeaderTemplate As DataTemplatepublic DataTemplate HeaderTemplate { get; set; }
    <ItemsPresenter>
      <ItemsPresenter.HeaderTemplate>
        singleDataTemplate
      </ItemsPresenter.HeaderTemplate>
    </ItemsPresenter>
    

    Property Value

    Remarks

    Windows 8.1 Header alignment is handled differently in apps compiled for Windows 8 than in apps compiled for Windows 8.1.+ In an app compiled for Windows 8, the header is always left-aligned when the orientation of the items is Horizontal, or top-aligned when the orientation is Vertical. VerticalAlignment and HorizontalAlignment values that you set are ignored.

  • HeaderTemplateProperty
    HeaderTemplateProperty
    HeaderTemplateProperty
    HeaderTemplateProperty

    Identifies the HeaderTemplate dependency property.

    public static DependencyProperty HeaderTemplateProperty { get; }public static DependencyProperty HeaderTemplateProperty { get; }Public Static ReadOnly Property HeaderTemplateProperty As DependencyPropertypublic static DependencyProperty HeaderTemplateProperty { get; }

    Property Value

  • HeaderTransitions
    HeaderTransitions
    HeaderTransitions
    HeaderTransitions

    Gets or sets the collection of Transition style elements that apply to the header of an ItemsPresenter.

    public TransitionCollection HeaderTransitions { get; set; }public TransitionCollection HeaderTransitions { get; set; }Public ReadWrite Property HeaderTransitions As TransitionCollectionpublic TransitionCollection HeaderTransitions { get; set; }
    <ItemsPresenter>
      <ItemsPresenter.HeaderTransitions>
        <TransitionCollection>
          oneOrMoreTransitions
        </TransitionCollection>
      </ItemsPresenter.HeaderTransitions>
    </ItemsPresenter>
    

    Property Value

    Remarks

    Important

    The XAML syntax for all properties that use a TransitionCollection value is unusual in that you must declare an explicit TransitionCollection object element as the value, and then provide object elements as child elements of TransitionCollection for each of the transition animations you want to use. For most other XAML collection properties you could omit the collection object element because it can be implicit, but properties that use TransitionCollection don't support the implicit collection usage. For more info on implicit collections and XAML, see XAML syntax guide.

    Transition animations play a particular role in UI design of your app. The basic idea is that when there is a change or transition, the animation draws the attention of the user to the change.

  • HeaderTransitionsProperty
    HeaderTransitionsProperty
    HeaderTransitionsProperty
    HeaderTransitionsProperty

    Identifies the HeaderTransitions dependency property.

    public static DependencyProperty HeaderTransitionsProperty { get; }public static DependencyProperty HeaderTransitionsProperty { get; }Public Static ReadOnly Property HeaderTransitionsProperty As DependencyPropertypublic static DependencyProperty HeaderTransitionsProperty { get; }

    Property Value

  • Padding
    Padding
    Padding
    Padding

    Gets or sets the distance between the ItemsPresenter and its child objects.

    public Thickness Padding { get; set; }public Thickness Padding { get; set; }Public ReadWrite Property Padding As Thicknesspublic Thickness Padding { get; set; }

    Property Value

    Remarks

    A Padding value applies to presentation rendering of each presented item and also to the header (if one is specified).

    A related property is Margin (a property of FrameworkElement ). For ItemsPresenter , margin and padding would typically blend together with the division between them not being apparent in the rendering. So it's typical to specify a Margin or a Padding, but not both. For more info about the relationship between margin and padding, see Alignment, margin, and padding or Define layouts with XAML.

  • PaddingProperty
    PaddingProperty
    PaddingProperty
    PaddingProperty

    Identifies the Padding dependency property.

    public static DependencyProperty PaddingProperty { get; }public static DependencyProperty PaddingProperty { get; }Public Static ReadOnly Property PaddingProperty As DependencyPropertypublic static DependencyProperty PaddingProperty { get; }

    Property Value

Methods

  • GetIrregularSnapPoints(Orientation, SnapPointsAlignment)
    GetIrregularSnapPoints(Orientation, SnapPointsAlignment)
    GetIrregularSnapPoints(Orientation, SnapPointsAlignment)
    GetIrregularSnapPoints(Orientation, SnapPointsAlignment)

    Returns a read-only collection of numbers that represent the snap points for the specified orientation.

    public IVectorView<float> GetIrregularSnapPoints(Orientation orientation, SnapPointsAlignment alignment)public IVectorView<float> GetIrregularSnapPoints(Orientation orientation, SnapPointsAlignment alignment)Public Function GetIrregularSnapPoints(orientation As Orientation, alignment As SnapPointsAlignment) As IVectorView( Of float )public IVectorView<float> GetIrregularSnapPoints(Orientation orientation, SnapPointsAlignment alignment)

    Parameters

    Returns

    • A read-only collection of numbers that represent the snap points for the specified orientation, or an empty collection when no snap points are present.

  • GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single)
    GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single)
    GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single)
    GetRegularSnapPoints(Orientation, SnapPointsAlignment, Single)

    Returns an original offset and interval for equidistant snap points for the specified orientation.

    public float GetRegularSnapPoints(Orientation orientation, SnapPointsAlignment alignment, Single offset)public float GetRegularSnapPoints(Orientation orientation, SnapPointsAlignment alignment, Single offset)Public Function GetRegularSnapPoints(orientation As Orientation, alignment As SnapPointsAlignment, offset As Single) As floatpublic float GetRegularSnapPoints(Orientation orientation, SnapPointsAlignment alignment, Single offset)

    Parameters

    Returns

    • float
      float
      float

      The interval between equidistant snap points for the specified orientation or 0 when no snap points are present.

Events

  • HorizontalSnapPointsChanged
    HorizontalSnapPointsChanged
    HorizontalSnapPointsChanged
    HorizontalSnapPointsChanged

    Occurs when the horizontal snap points change.

    public event EventHandler HorizontalSnapPointsChangedpublic event EventHandler HorizontalSnapPointsChangedPublic Event HorizontalSnapPointsChangedpublic event EventHandler HorizontalSnapPointsChanged
    <ItemsPresenter HorizontalSnapPointsChanged="eventhandler" />
    
  • VerticalSnapPointsChanged
    VerticalSnapPointsChanged
    VerticalSnapPointsChanged
    VerticalSnapPointsChanged

    Occurs when the vertical snap points change.

    public event EventHandler VerticalSnapPointsChangedpublic event EventHandler VerticalSnapPointsChangedPublic Event VerticalSnapPointsChangedpublic event EventHandler VerticalSnapPointsChanged
    <ItemsPresenter VerticalSnapPointsChanged="eventhandler" />
    

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.StaticAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Xaml.Controls.dll