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: