Skip to content

Commit 9b18f0b

Browse files
Copilotcsharpfritz
andcommitted
Add comprehensive documentation for HyperLink component
Co-authored-by: csharpfritz <78577+csharpfritz@users.noreply.github.com>
1 parent c7b798f commit 9b18f0b

1 file changed

Lines changed: 83 additions & 4 deletions

File tree

docs/EditorControls/HyperLink.md

Lines changed: 83 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,90 @@ It may seem strange that we have a HyperLink component when there already is an
22

33
## Blazor Features Supported
44

5-
- `NavigationUrl` the URL to link when HyperLink component is clicked
6-
- `Text` the text content of the HyperLink component
7-
- `Target` the target window or frame in which to display the Web page content linked to when the HyperLink component is clicked
5+
### Core Properties
6+
- `NavigationUrl` - the URL to link when HyperLink component is clicked
7+
- `Text` - the text content of the HyperLink component
8+
- `Target` - the target window or frame in which to display the Web page content linked to when the HyperLink component is clicked (e.g., "_blank", "_self", "_parent", "_top")
9+
- `ToolTip` - displays a tooltip on hover (rendered as the `title` attribute)
810

9-
## WebForms Syntax
11+
### Styling Properties
12+
- `BackColor` - background color of the hyperlink
13+
- `ForeColor` - text color of the hyperlink
14+
- `BorderColor` - border color
15+
- `BorderStyle` - border style (NotSet, None, Dotted, Dashed, Solid, Double, Groove, Ridge, Inset, Outset)
16+
- `BorderWidth` - border width
17+
- `CssClass` - CSS class name to apply to the hyperlink
18+
- `Height` - height of the hyperlink
19+
- `Width` - width of the hyperlink
20+
21+
### Font Properties
22+
- `Font-Bold` - bold text
23+
- `Font-Italic` - italic text
24+
- `Font-Names` - font family names
25+
- `Font-Overline` - overline text decoration
26+
- `Font-Size` - font size
27+
- `Font-Strikeout` - strikethrough text decoration
28+
- `Font-Underline` - underline text decoration
29+
30+
### Other Properties
31+
- `Enabled` - whether the hyperlink is enabled (default: true)
32+
- `Visible` - whether the hyperlink is visible (default: true)
33+
- `TabIndex` - tab order for keyboard navigation
34+
35+
### Event Handlers
36+
- `OnDataBinding` - event handler for data binding
37+
- `OnInit` - event handler triggered at initialization
38+
- `OnLoad` - event handler triggered after component loads
39+
- `OnPreRender` - event handler triggered before rendering
40+
- `OnUnload` - event handler triggered when component unloads
41+
- `OnDisposed` - event handler triggered when component is disposed
42+
43+
## WebForms Features Not Supported
44+
45+
- `ImageUrl` - The Blazor HyperLink component does not support image links. Use the Image component wrapped in an anchor tag instead.
46+
- `AccessKey` - Not supported in Blazor
47+
- `EnableTheming` - Theming is not available in Blazor
48+
- `EnableViewState` - ViewState is supported for compatibility but this parameter does nothing
49+
- `SkinID` - Theming is not available in Blazor
50+
51+
## Usage Examples
52+
53+
### Web Forms Syntax
54+
```html
55+
<asp:HyperLink ID="lnkExample"
56+
NavigateUrl="https://example.com"
57+
Text="Visit Example"
58+
Target="_blank"
59+
ToolTip="Click to visit example.com"
60+
CssClass="btn btn-link"
61+
runat="server" />
62+
```
63+
64+
### Blazor Syntax
65+
```html
66+
<HyperLink NavigationUrl="https://example.com"
67+
Text="Visit Example"
68+
Target="_blank"
69+
ToolTip="Click to visit example.com"
70+
CssClass="btn btn-link" />
71+
```
72+
73+
### Blazor with Styling
74+
```html
75+
<HyperLink NavigationUrl="/products"
76+
Text="View Products"
77+
ForeColor="#0066cc"
78+
Font-Bold="true"
79+
Font-Size="14px" />
80+
```
81+
82+
### Blazor without NavigationUrl (renders as plain anchor)
83+
```html
84+
<HyperLink Text="Inactive Link"
85+
ToolTip="This link has no URL" />
86+
```
87+
88+
## WebForms Syntax Reference
1089

1190
```html
1291
<asp:HyperLink

0 commit comments

Comments
 (0)