2010-09-21 59 views
1

我在看別人的控制模板,無論這個模板需要包括的內容,它的用途:<ContentControl><ContentPresenter /></ ContentControl>?

<ContentControl> 
    <ContentPresenter /> 
</ContentControl> 

爲什麼不使用只<ContentPresenter />?是否有任何理由需要將其包裝在ContentControl中?

感謝

康斯坦丁

回答

1

有任何理由需要將其包裹在ContentControl中?

它不需要。這樣做是無用的,你只需要在ControlTemplate

+0

中使用<ContentPresenter />我以爲是,謝謝 – akonsu 2010-09-21 20:41:39

相關問題