Snap to brush color

I am trying to animate the property of the fill path. So far I am using ColorAnimation, which works well. Target property (Shape.Fill). (SolidColorBrush.Color) and I set it to "# 999999" (color sample only).

The problem arises because I would like to set the value to "{TemplateBinding Background}". Since Background is a brush, and the property I'm aiming at is color, this does not result in a lack of color in the animation.

I would be happy if I could just figure out how to set the value for the color part of the background brush. Any ideas?

By the way, this is a control template for ToggleButton.

Thanks David

+3
source share
1 answer

, IValueConverter Converter . Background, , , . , .

+4

Source: https://habr.com/ru/post/1712875/


All Articles