我有一个样式模板(下面),它不更新某些自定义控件属性。
...
<Style x:Name="KeyboardButton" TargetType="Controls:KeyboardButton">
...
<Setter Property="ArrowDirection" Value="Right" />
<Setter Property="ArrowBeginColor" Value="Red" />
<Setter Property="Template">
...
arrowBeginColor ID颜色(不是画笔)类型的DependencyProperty。
如果不使用setter,则arrowBeginColor是DependencyProperty(New PropertyMetadata(colors.black))中的默认颜色black;
但当我在模板系统中使用setter时,无法获得颜色。搅拌机运行出错,而设置颜色为00000000。
我做错什么了?为什么ArrowBeginColor不为我的自定义控件正确设置颜色?
其他dp正常,仅dp颜色类型有问题。
Silverlight 4,与2010年相比。