110,534
社区成员
发帖
与我相关
我的任务
分享
[Serializable]
public class SerializableButton : Button, ISerializable
{
public SerializableButton() { }
public SerializableButton(SerializationInfo info, StreamingContext context)
{
Width = info.GetDouble("Width");
Height = info.GetDouble("Height");
Background = (Brush)info.GetValue("Content", typeof(Brush));
}
public void GetObjectData(SerializationInfo info, StreamingContext context)
{
info.AddValue("Width", Width);
info.AddValue("Height", Height);
info.AddValue("Background", Background);
}
}