DesignerSerializationVisibilityAttribute.DesignerSerializationVisibilityAttribute Constructor

Initializes a new instance of the DesignerSerializationVisibilityAttribute class using the specified DesignerSerializationVisibility value.

Namespace: System.ComponentModel
Assembly: System (in system.dll)

public DesignerSerializationVisibilityAttribute (
	DesignerSerializationVisibility visibility
)
public DesignerSerializationVisibilityAttribute (
	DesignerSerializationVisibility visibility
)
public function DesignerSerializationVisibilityAttribute (
	visibility : DesignerSerializationVisibility
)
Not applicable.

Parameters

visibility

One of the DesignerSerializationVisibility values.

The following code example specifies how a property on a component is saved by a designer. This code creates a new DesignerSerializationVisibilityAttribute and sets its value to DesignerSerializationVisibilityAttribute.Content.

[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
 public int MyProperty {
    get {
       // Insert code here.
       return(0);
    }
    set {
       // Insert code here.
    }
 }

/** @attribute DesignerSerializationVisibility(
    DesignerSerializationVisibility.Content)
 */
/** @property 
 */
public int get_MyProperty()
{
    // Insert code here.
    return 0;
} //get_MyProperty

/** @property 
 */
public void set_MyProperty(int value)
{
    // Insert code here.
} //set_MyProperty

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, 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, 1.1, 1.0

Community Additions

ADD
Show: