2
我試圖做一個幻想閃爍的圖標和動畫的GeometryDrawing的畫筆,並不知道如何做到這一點。可能嗎?如何爲GeometryDrawing的屬性設置動畫效果?
下面是一些基本的XAML
<Window.Resources>
<GeometryDrawing x:Key="_geometryTest" Brush="#FF6C897B" Geometry="F1 M 66,188L 194,60L 322,188L 250.889,188L 250.889,348L 137.111,348L 137.111,188L 66,188 Z ">
<GeometryDrawing.Pen>
<Pen LineJoin="Round" Brush="#FF000000"/>
</GeometryDrawing.Pen>
</GeometryDrawing>
</Window.Resources>
<Grid>
<Image>
<Image.Source>
<DrawingImage x:Name="_myImage" Drawing="{StaticResource _geometryTest}"/>
</Image.Source>
</Image>
</Grid>
嵌套的TargetProperty語法就是我一直在尋找的謝謝! – kbeal2k 2011-01-20 16:50:46