用户控件 System.Windows.Forms.PictureBox 未标记为可序列化,该如何处理
用户控件 System.Windows.Forms.PictureBox 未标记为可序列化
我写的一个用户控件里包含几个winform控件,当使用这个用户控件时报错:
System.Windows.Forms.PictureBox 未标记为可序列化
------解决方案--------------------
调用方代码呢
public partial class UCDemo : UserControl
{
/// <summary>
/// 显示图片
/// </summary>
public PictureBox _Pic { get; set; }
/// <summary>
/// 提示信息
/// </summary>
public Label _Lable { get; set; }
//.....
}
我写的一个用户控件里包含几个winform控件,当使用这个用户控件时报错:
System.Windows.Forms.PictureBox 未标记为可序列化
用户控件
C#
------解决方案--------------------
调用方代码呢