I have the following code:
<Grid.Background>
<DrawingBrush Stretch="Uniform">
<DrawingBrush.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="{Binding Path=Segm开发者_如何学PythonentBackground, ElementName=Segment, Mode=OneWay}" x:Name="SegmentDrawing" Geometry="M 278.229,141.688C 278.229,128.798 276.451,116.324 273.128,104.497L 228.906,122.309C 230.417,128.8 231.216,135.565 231.216,142.517C 231.216,147.98 230.723,153.328 229.778,158.518L 275.262,170.2C 277.206,161.002 278.229,151.464 278.229,141.688 Z ">
<GeometryDrawing.Pen>
<Pen LineJoin="Round" Brush="#FF000000"/>
</GeometryDrawing.Pen>
</GeometryDrawing>
</DrawingGroup>
</DrawingBrush.Drawing>
</DrawingBrush>
</Grid.Background>
My question is simple, I want to animate the Brush property of the GeometryDrawingBrush. The drawing is the main visual of my control, and I want the color of the brush to change to reflect it's state (Normal,Over, etc.).
精彩评论