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
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om