views:

26

answers:

1

I have a style template (below) that does not update some my custom control properties.

...
    <Style x:Name="KeyboardButton" TargetType="Controls:KeyboardButton">
...
        <Setter Property="ArrowDirection" Value="Right" />
        <Setter Property="ArrowBeginColor" Value="Red" />

        <Setter Property="Template">
...

ArrowBeginColor id DependencyProperty of Color (not brush) type. When I do not use a setter, ArrowBeginColor is default color Black, from DependencyProperty (new PropertyMetadata(Colors.Black));) But when I use a setter in template system can't get color. Blender runing out witn error, VS seting color to #00000000.

What do I wrong? Why ArrowBeginColor do not set color for my custom control propertly?

Other DP is OK, problem with DP Color type only. Silverlight 4, VS 2010.

A: 

What's your reason for using a Color type instead of Brush? Brush is far better in terms of support with both the VS designer and Blend

bendewey