tags:

views:

209

answers:

1

Hi,

I want to clone a WPF Control (XamDataGrid)

I know these ways:

  1. Clone
    Problem: Control is not Cloneable

  2. Serialize & Deserialize in binary format
    Problem: Control is not serializable

  3. Serialize as XML
    Problem: control contains images and Images are not serializable in xml serialization

Do you have any valid workarounds ?

A: 

Thanks Josh for your answer

My problem in the FlowDirection property in the grid control,

WPF doesn't support Right to left in Printing, And It prints the controls with mirroring,

I have lookup about a workarround in the internet, and I found the following:

  1. Clone the control
  2. Make the cloned version as Left To right
  3. Do custom Right to left with columns (by a loop)

That are what I trying to do.

,,,,

XamlWriter and XamlReader have prblems if the control contains images, and throw this exception: "Cannot serialize a non-public type 'System.Windows.Media.Imaging.BitmapFrameDecode' "

Thank you very much for your help. Regards

Homam