0
我有一個自定義控件擴展圖像,我會把一些更多的數據在該圖像的頂部。然而,當我試圖風格的組成部分,我得到的錯誤,我的自定義控件沒有財產Template
錯誤:創建一個自定義控件擴展圖像
Cannot find the Style Property 'Template' on the type 'MyCustomImage'
我怎樣才能樣式我的自定義控制,如果圖像沒有模板屬性?
感謝
編輯: 的XAML:
<Style TargetType="{x:Type FieldComponents:MyCustomImage}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type FieldComponents:MyCustomImage}">
</ControlTemplate>
</Setter.Value>
</Setter>
</style>
你能分享你使用的xaml嗎? – Amsakanna 2010-07-08 09:13:30
肯定,修改了這個問題 – 2010-07-08 10:06:00