FormViewDesigner.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

属性值

Boolean

始终返回 trueAlways returns true.

注解

因为 UsePreviewControl 属性始终为 true,所以设计器使用 View 包含关联控件的副本的控件 FormView 来生成设计时标记。Because the UsePreviewControl property is always true, the designer uses a View control that contains a copy of the associated FormView control to generate the design-time markup. View控件不影响的任何持久性 FormViewThe View control does not affect any persistence for the FormView. 如果 UsePreviewControl 已重写属性以返回 false ,设计器将使用关联的 FormView 自身来生成设计时标记。If the UsePreviewControl property has been overridden to return false, the designer will use the associated FormView itself to generate the design-time markup.

继承者说明

您可以重写 UsePreviewControl 属性以返回 false 或根据控件是否用类级别对象标记来确定其值 SupportsPreviewControlAttributeYou 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 object. 如果 UsePreviewControl 未重写,则 FormView 控件将忽略 SupportsPreviewControlAttributeIf the UsePreviewControl is not overridden, the FormView control ignores the SupportsPreviewControlAttribute.

适用于

另请参阅