Is it possible to use multiple brushes within a single GeometryDrawing
? I have several geometries that I want to draw with different brushes, and it's rather verbose to have to declare an individual GeometryDrawing
for each. I'm looking for a more concise way to express the following:
<DrawingImage x:Key="SomeDrawingImage">
<DrawingImage.Drawing>
<DrawingGroup>
<GeometryDrawing Brush="{StaticResource SomeGradient}">
<GeometryDrawing.Geometry>
<PathGeometry Figures="{StaticResource SomeFigures}">
<PathGeometry.Transform>
<TransformGroup>
<TranslateTransform X="50" />
</TransformGroup>
</PathGeometry.Transform>
</PathGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
<GeometryDrawing Brush="{StaticResource SomeOtherGradient}">
<GeometryDrawing.Geometry>
<PathGeometry Figures="{StaticResource SomeOtherFigures}">
<PathGeometry.Transform>
<TransformGroup>
<TranslateTransform X="100" />
</TransformGroup>
</PathGeometry.Transform>
</PathGeometry>
</GeometryDrawing.Geometry>
</GeometryDrawing>
</DrawingGroup>
</DrawingImage.Drawing>
</DrawingImage>