Serialize a Visual Brush

Hey,

I was just wondering if it is at all possible to serialize a visual brush either by serializing the object itself (which i believe it is not serializeable) or by converting it to another object type and serializing that. I was hoping to use WCF to send a visual brush over the network to display the contents of it on another computer, perhaps in a rectangle control.

I am not sure if it is possible or not.  I am thinking it isn't, but perhaps there is a way I don't know about.  Thanx for the help.

~
Stargex


Answer this question

Serialize a Visual Brush

  • mcl7cdm

    Why not just render the visual contained in the VisualBrush to a Bitmap and shovel that across the network You can serialize any WPF visual to a Bitmap using the RenderTargetBitmap class. For details on how to use it, just search this forum because it's a common topic with plenty of sample code.

    HTH,
    Drew


  • Serialize a Visual Brush