ControlDesignerSetViewFlags Method
 

Assigns the specified bitwise ViewFlags enumeration to the specified flag value.

Namespace:   System.Web.UI.Design
Assembly:  System.Design (in System.Design.dll)

Syntax
protected void SetViewFlags(
	ViewFlags viewFlags,
	bool setFlag
)
protected:
void SetViewFlags(
	ViewFlags viewFlags,
	bool setFlag
)
member SetViewFlags : 
        viewFlags:ViewFlags *
        setFlag:bool -> unit
Protected Sub SetViewFlags (
	viewFlags As ViewFlags,
	setFlag As Boolean
)

Parameters

viewFlags
Type:

A ViewFlags value.

setFlag
Type:

true to set the flag, false to remove the flag.

Remarks

There are several flags that can be set. For example, use the SetViewFlags method to set the DesignTimeHtmlRequiresLoadComplete value of the current property for the control designer, instead of the obsolete property.

Examples

The following code example shows how to use the SetViewFlags method to indicate that the template is in editing mode.

public override void Initialize(IComponent component)
{
    // Initialize the base
    base.Initialize(component);
    // Turn on template editing
    SetViewFlags(ViewFlags.TemplateEditing, true);
}
Public Overrides Sub Initialize(ByVal Component As IComponent)
    ' Initialize the base
    MyBase.Initialize(Component)
    ' Turn on template editing
    SetViewFlags(ViewFlags.TemplateEditing, True)
End Sub
Version Information
.NET Framework
Available since 2.0
Return to top