Persistence

Control.Persistence property

获取用于存储 ActiveX 控件属性的方法。 只读PersistenceType

public PersistenceType Persistence { get; }

例子

下一个示例显示了使用 Persistence 属性来检查 ActiveX 对象的属性是否可以更改为基于 XML ActiveX 属性:

[C#]
if (control.Persistence == PersistenceType.PersistPropertyBag)
{
    control.Properties["Value"] = value;
}
else
{
    YourMethodHere(control.ActiveXControlBinary);  //使用您自己的方法来管理存储在其二进制文件中的 ActiveX 属性
}

也可以看看