DesignerAutoFormat.GetPreviewControl(Control) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a copy of the associated control in order to provide a preview before applying the format to the control.
public:
virtual System::Web::UI::Control ^ GetPreviewControl(System::Web::UI::Control ^ runtimeControl);
public virtual System.Web.UI.Control GetPreviewControl (System.Web.UI.Control runtimeControl);
abstract member GetPreviewControl : System.Web.UI.Control -> System.Web.UI.Control
override this.GetPreviewControl : System.Web.UI.Control -> System.Web.UI.Control
Public Overridable Function GetPreviewControl (runtimeControl As Control) As Control
Parameters
- runtimeControl
- Control
A run-time version of the Web server control.
Returns
The GetPreviewControl(Control) method returns a copy of the associated Web server control.
Remarks
The GetPreviewControl method is used by visual designers, such as Visual Studio 2005, in an AutoFormat dialog box to display a formatted run-time preview of the control at design time before applying the format to the actual control.
Regardless of the setting of the SupportsPreviewControlAttribute attribute for the ControlDesigner object, the GetPreviewControl method returns a copy of the control in the runtimeControl
parameter.
Notes to Inheritors
You can override the GetPreviewControl(Control) method in the following situations:
The size of the returned control will be different from the original control.
The control must be populated with sample data in order to present a sufficient preview.
Applies to
See also
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應