akonsu
akonsu

Reputation: 29536

<ContentControl><ContentPresenter/></ContentControl>?

I am looking at someone's control template and wherever this template needs to include content, it uses:

<ContentControl>
   <ContentPresenter />
</ContentControl> 

Why not use just <ContentPresenter />? Is there any reason why it needs to be wrapped in ContentControl?

Thanks

konstantin

Upvotes: 1

Views: 696

Answers (1)

Thomas Levesque
Thomas Levesque

Reputation: 292425

Is there any reason why it needs to be wrapped in ContentControl?

It doesn't need to. Doing this is useless, you only need to use <ContentPresenter /> in a ControlTemplate

Upvotes: 1

Related Questions