Panel.IsItemsHost Property

Definition

Gets a value that indicates whether this Panel is a container for UI items that are generated by an ItemsControl.

public:
 property bool IsItemsHost { bool get(); };
bool IsItemsHost();
public bool IsItemsHost { get; }
var boolean = panel.isItemsHost;
Public ReadOnly Property IsItemsHost As Boolean

Property Value

Boolean

bool

true if this instance of Panel is an items host; otherwise, false. The default is false.

Remarks

IsItemsHost is a calculated property where the value results from the system checking the parents of the Panel for an ItemsControl implementation. If one exists, then the value is true.

In previous frameworks this property was settable. It's not settable in the Windows Runtime, and there should be no need to set it because the system has the calculation behavior. If you want a different relationship between a panel and a parent items control, just create it that way in your XAML control compositing.

Applies to

See also