DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility) 생성자

정의

지정된 DesignerSerializationVisibilityAttribute 값을 사용하여 DesignerSerializationVisibility 클래스의 새 인스턴스를 초기화합니다.Initializes a new instance of the DesignerSerializationVisibilityAttribute class using the specified DesignerSerializationVisibility value.

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)

매개 변수

예제

다음 코드 예제에서는 구성 요소의 속성은 디자이너에서 어떻게 저장 되는지 지정 합니다.The following code example specifies how a property on a component is saved by a designer. 이 코드는 새 DesignerSerializationVisibilityAttribute를 만들고 해당 값을 DesignerSerializationVisibilityAttribute.Content로 설정 합니다.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.
      }
   }
[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

적용 대상

추가 정보