1
爲什麼我們能任DataTemplate
或ControlTemplate
分配給Template
財產是ControlTemplate
類型的在下面的標記: -ControlTemplate類型的Template屬性在樣式中接受'DataTemplate&ControlTemplate'?
<Style TargetType="ListBox">
<Setter Property="Template">
<Setter.Value>
<!--
Visual Studio Intellisense shows
both ControlTemplate and
DataTemplate here.
-->
</Setter.Value>
</Setter>
</Style>