In my wpf application i am drawing a lot of geometries as below. My requirement is to change the color of drawingvisual with out redrawing it? any possibilities in wpf?
using (DrawingContext vDrawingContext = vDrawingVisual.RenderOpen())
{
StreamGeometry vGeom = GetCutGeometry(mLength, mWidth);
vDrawingContext.DrawGeometry(mBackGroundBrush, ForeGroundPen, vGeom);
vDrawingContext.Close();
VisualChildren.Add(vDrawingVisual);
}
How could be mBackGroundBrush dyamic colors?