LoginViewDesigner.UsePreviewControl 属性
定义
获取一个值,指示设计器是否应使用临时副本取代与设计器关联的实际控件来生成设计时标记。Gets a value indicating whether the designer should use a temporary copy rather than the actual control that is associated with the designer to generate the design-time markup.
protected:
virtual property bool UsePreviewControl { bool get(); };
protected override bool UsePreviewControl { get; }
member this.UsePreviewControl : bool
Protected Overrides ReadOnly Property UsePreviewControl As Boolean
属性值
总是为 true。Always true.
注解
由于 UsePreviewControl 属性始终为 true ,因此设计器 ViewControl 属性返回关联控件的副本, LoginView 以生成设计时标记。Because the UsePreviewControl property is always true, the designer ViewControl property returns a copy of the associated LoginView control to generate the design-time markup. ViewControl属性通过保持实际的 LoginView 控件,然后分析持久化的控制字符串来创建副本。The ViewControl property creates the copy by persisting the actual LoginView control, then parsing the persisted control string. 复制的控件不会影响实际的任何持久性 LoginView 。The copied control does not affect any persistence for the actual LoginView.
如果 UsePreviewControl 已重写属性以返回 false ,则设计器将使用关联 LoginView 控件本身来生成设计时标记,对控件的设计时更改将保留在页标记源中。If the UsePreviewControl property has been overridden to return false, the designer will use the associated LoginView control itself to generate the design-time markup, and design-time changes to the control will persist to the page markup source.
继承者说明
您可以重写 UsePreviewControl 属性以返回 false 或根据控件是否标记为类级别特性来确定其值 SupportsPreviewControlAttribute 。You can override the UsePreviewControl property to return false or to determine its value based on whether the control is marked with a class level SupportsPreviewControlAttribute attribute. 如果 UsePreviewControl 未重写,则将 LoginView 忽略 SupportsPreviewControlAttribute 。If the UsePreviewControl is not overridden, the LoginView ignores the SupportsPreviewControlAttribute.