ControlDesigner.SetViewFlags Method

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

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

'Declaration
Protected Sub SetViewFlags ( _
	viewFlags As ViewFlags, _
	setFlag As Boolean _
)
'Usage
Dim viewFlags As ViewFlags
Dim setFlag As Boolean

Me.SetViewFlags(viewFlags, setFlag)
protected void SetViewFlags (
	ViewFlags viewFlags, 
	boolean setFlag
)
protected function SetViewFlags (
	viewFlags : ViewFlags, 
	setFlag : boolean
)
Not applicable.

Parameters

viewFlags

A ViewFlags value.

setFlag

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

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

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

Public Overrides Sub Initialize(ByVal Component As IComponent)
    ' Initialize the base
    MyBase.Initialize(Component)
    ' Turn on template editing
    SetViewFlags(ViewFlags.TemplateEditing, True)
End Sub

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: