3

ComboBox から派生した CustomControl があります

  CustomComboBox : ComboBox 
  {} 

問題は、ComboBox が StyleTypedProperty 属性で装飾されていることです。

 [StyleTypedProperty(Property = "ItemContainerStyle", StyleTargetType = typeof(ComboBoxItem))]
 public class ComboBox  {} 

別の StyleTargetType を提供したいのですが、そのような回避策は可能ですか?

iv'eも自分自身を定義しようとしました:

[StyleTypedProperty(Property = "ItemContainerStyle", StyleTargetType = typeof(CustomComboBoxItem))]

それは効果がありませんでした..

4

1 に答える 1