Edit

Share via


AnnotationResource Constructors

Definition

Initializes a new instance of the AnnotationResource class.

Overloads

AnnotationResource()

This constructor supports the Windows Presentation Foundation infrastructure and is not intended to be used directly from your code.

AnnotationResource(Guid)

This constructor supports the Windows Presentation Foundation infrastructure and is not intended to be used directly from your code.

AnnotationResource(String)

Initializes a new instance of the AnnotationResource class with a specified name.

AnnotationResource()

This constructor supports the Windows Presentation Foundation infrastructure and is not intended to be used directly from your code.

public:
 AnnotationResource();
public AnnotationResource ();
Public Sub New ()

Remarks

This constructor is intended for annotation serializer use only. For application needs, use the AnnotationResource constructor that accepts a specified name parameter.

Applies to

AnnotationResource(Guid)

This constructor supports the Windows Presentation Foundation infrastructure and is not intended to be used directly from your code.

public:
 AnnotationResource(Guid id);
public AnnotationResource (Guid id);
new System.Windows.Annotations.AnnotationResource : Guid -> System.Windows.Annotations.AnnotationResource
Public Sub New (id As Guid)

Parameters

id
Guid

The globally unique identifier (GUID) that identifies this resource.

Exceptions

id is equal to Guid.Empty.

Remarks

This constructor is intended for annotation serializer use only. For application needs, use the AnnotationResource constructor that accepts a specified name parameter.

Applies to

AnnotationResource(String)

Initializes a new instance of the AnnotationResource class with a specified name.

public:
 AnnotationResource(System::String ^ name);
public AnnotationResource (string name);
new System.Windows.Annotations.AnnotationResource : string -> System.Windows.Annotations.AnnotationResource
Public Sub New (name As String)

Parameters

name
String

A name to identify this resource from other Anchors and Cargos defined in the same annotation.

Exceptions

name is null.

Remarks

The name parameter is provided for convenience only and no validation is performed on the string.

The AnnotationResource constructor automatically creates a GUID that is accessible through the Id property.

Applies to