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)
Assembly: System.Design (in system.design.dll)
Syntax
Visual Basic (Declaration)
Protected Sub SetViewFlags ( _ viewFlags As ViewFlags, _ setFlag As Boolean _ )
Visual Basic (Usage)
Dim viewFlags As ViewFlags Dim setFlag As Boolean Me.SetViewFlags(viewFlags, setFlag)
C#
protected void SetViewFlags ( ViewFlags viewFlags, bool setFlag )
C++
protected: void SetViewFlags ( ViewFlags viewFlags, bool setFlag )
J#
protected void SetViewFlags ( ViewFlags viewFlags, boolean setFlag )
JScript
protected function SetViewFlags ( viewFlags : ViewFlags, setFlag : boolean )
XAML
Not applicable.
Parameters
- viewFlags
-
A ViewFlags value.
- setFlag
-
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 ViewControl property for the control designer, instead of the obsolete DesignTimeHtmlRequiresLoadComplete property.
Example
The following code example shows how to use the SetViewFlags method to indicate that the template is in editing mode.
Visual Basic
Public Overrides Sub Initialize(ByVal Component As IComponent) ' Initialize the base MyBase.Initialize(Component) ' Turn on template editing SetViewFlags(ViewFlags.TemplateEditing, True) End Sub
C#
public override void Initialize(IComponent component) { // Initialize the base base.Initialize(component); // Turn on template editing SetViewFlags(ViewFlags.TemplateEditing, true); }
Platforms
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.Version Information
.NET Framework
Supported in: 3.0, 2.0See Also