Trevor
Trevor

Reputation: 373

Why is ItemsControl.ItemsPanelRoot null by default?

ItemsPanelRoot Docs

If ItemsPanel is a template of StackPanel by default (see docs), then shouldn't ItemsPanelRoot return an instance of StackPanel by default?

Upvotes: 0

Views: 239

Answers (1)

Trevor
Trevor

Reputation: 373

It looks like it's null because I haven't yet set ItemsSource. Additionally, even if ItemsSource is set, I need to wait for the Loaded event.

Upvotes: 4

Related Questions