Class HyperlinkSettings
Represents a control for creating a link to another Web page.
Inherited Members
Namespace: Syncfusion.Blazor.Diagram
Assembly: Syncfusion.Blazor.dll
Syntax
public class HyperlinkSettings : DiagramObject, IDiagramObject, ICloneable
Remarks
The hyperlink can be customized by adding text and color. The Hyperlink can be set to the Annotations of the node/connector.
Examples
Node node = new Node()
{
// Position of the node
OffsetX = 250,
OffsetY = 250,
// Size of the node
Width = 100,
Height = 100,
Style = new ShapeStyle() { Fill = "#6495ED", StrokeColor = "white" },
// Initialize annotation collection
Annotations = new DiagramObjectCollection<ShapeAnnotation>()
{
// Add text as hyperlink.
new ShapeAnnotation { Hyperlink = new Hyperlink{ Content = "Syncfusion", Link = "https://www.syncfusion.com" } }
},
};
Constructors
HyperlinkSettings()
Initializes a new instance of the Hyperlink.
Declaration
public HyperlinkSettings()
HyperlinkSettings(HyperlinkSettings)
Creates a new instance of the Hyperlink from the given Hyperlink.
Declaration
public HyperlinkSettings(HyperlinkSettings src)
Parameters
Type | Name | Description |
---|---|---|
HyperlinkSettings | src | Hyperlink |
Properties
Color
Gets or sets the fill color of the hyperlink. Color is string type.
Declaration
public string Color { get; set; }
Property Value
Type |
---|
System.String |
Examples
Node node = new Node()
{
Annotations = new DiagramObjectCollection<ShapeAnnotation>()
{
// Add text as hyperlink.
new ShapeAnnotation { Hyperlink = new Hyperlink{ Color = "Red", Link = "https://www.syncfusion.com" } }
},
};
Content
Gets or sets the content of the hyperlink.
Declaration
public string Content { get; set; }
Property Value
Type |
---|
System.String |
Examples
Node node = new Node()
{
Annotations = new DiagramObjectCollection<ShapeAnnotation>()
{
// Add text as hyperlink.
new ShapeAnnotation { Hyperlink = new Hyperlink{ Content = "Syncfusion", Link = "https://www.syncfusion.com" } }
},
};
TextDecoration
Defines the text-decoration for the content of the hyperlink.
Declaration
public TextDecoration TextDecoration { get; set; }
Property Value
Type | Description |
---|---|
TextDecoration | The default value will be None |
Remarks
The following options are used to define the TextDecoration of the hyperlink. |
1. None - Represents the default appearance of a text. |
2. Overline - Draws a horizontal line above the text. |
3. Underline - Draws a horizontal line under the text. |
4. LineThrough - Draws a horizontal line through the text of a node or a connector.. |
Examples
Node node = new Node()
{
Annotations = new DiagramObjectCollection<ShapeAnnotation>()
{
// Add text as hyperlink.
new ShapeAnnotation { Hyperlink = new Hyperlink{ TextDecoration = TextDecoration.None, Content = "Syncfusion", Link = "https://www.syncfusion.com" } }
},
};
Url
Defines the link to be set for the hyperlink.
Declaration
public string Url { get; set; }
Property Value
Type |
---|
System.String |
Examples
Node node = new Node()
{
Annotations = new DiagramObjectCollection<ShapeAnnotation>()
{
// Add text as hyperlink.
new ShapeAnnotation { Hyperlink = new Hyperlink{ Link = "https://www.syncfusion.com" } }
},
};
Methods
Clone()
Creates a new hyperlink that is a copy of the current hyperlink.
Declaration
public override object Clone()
Returns
Type | Description |
---|---|
System.Object | Hyperlink |
Overrides
Implements
System.ICloneable