如何在WPF中克隆控件?

问题描述:

我想克隆一个WPF控件( XamDataGrid

I want to clone a WPF Control (XamDataGrid)

我知道这些方法:


  1. 克隆

    问题:控件不可克隆

  1. Clone
    Problem: Control is not Cloneable

序列化和以二进制格式反序列化

问题:控件不可序列化

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

序列化为XML

问题:控件包含图像并且图像无法在xml序列化中序列化

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

您有任何有效的解决方法吗?

Do you have any valid workarounds ?