ItemsControl.ItemContainerStyle property

Applies to Windows and Windows Phone

Gets or sets the style that is used when rendering the item containers.

Syntax


public Style ItemContainerStyle { get; set; }


<itemsControl>
  <itemsControl.ItemContainerStyle>
    inlineStyle
  </itemsControl.ItemContainerStyle>
</itemsControl>


<itemsControl ItemContainerStyle="resourceReferenceToStyle"/>

XAML Values

inlineStyle

A single Style object element. That Style would typically have multiple setters that set properties on the item container type being targeted. (For ListBox, that type is ListBoxItem.)

resourceReferenceToStyle

A StaticResource reference to an existing Style from a XAML resource dictionary.

Property value

Type: Style

The style applied to the item containers. The default is null.

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

ItemsControl

 

 

Show:
© 2014 Microsoft. All rights reserved.