Compartir vía


DesignerSerializationVisibilityAttribute Constructor

Definición

Inicializa una nueva instancia de la clase DesignerSerializationVisibilityAttribute usando el valor de DesignerSerializationVisibility especificado.

public:
 DesignerSerializationVisibilityAttribute(System::ComponentModel::DesignerSerializationVisibility visibility);
public DesignerSerializationVisibilityAttribute (System.ComponentModel.DesignerSerializationVisibility visibility);
new System.ComponentModel.DesignerSerializationVisibilityAttribute : System.ComponentModel.DesignerSerializationVisibility -> System.ComponentModel.DesignerSerializationVisibilityAttribute
Public Sub New (visibility As DesignerSerializationVisibility)

Parámetros

Ejemplos

En el ejemplo de código siguiente se especifica cómo un diseñador guarda una propiedad en un componente. Este código crea un nuevo DesignerSerializationVisibilityAttribute y establece su valor en DesignerSerializationVisibilityAttribute.Content.

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

<DesignerSerializationVisibility(DesignerSerializationVisibility.Content)> _
Public Property _
    MyProperty() As Integer
    
    Get
        ' Insert code here.
        Return 0
    End Get
    Set
        ' Insert code here.
    End Set 
End Property

Se aplica a

Consulte también