开发者

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

开发者 https://www.devze.com 2023-01-17 05:21 出处:网络
I am looking at someone\'s control template and wherever this template needs to include content, it uses:

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 wrapp开发者_运维知识库ed in ContentControl?

Thanks

konstantin


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

0

精彩评论

暂无评论...
验证码 换一张
取 消