Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

DesignerSerializationVisibilityAttribute Constructor (DesignerSerializationVisibility)

 

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
)

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.

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

.NET Framework
Available since 1.1
Return to top
Show:
© 2017 Microsoft