DesignerSerializationVisibilityAttribute Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
Parameters
- visibility
- DesignerSerializationVisibility
One of the DesignerSerializationVisibility values.
Examples
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.
}
}
[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