Class HyperlinkButton
A button control that functions as a navigateable hyperlink.
[PseudoClasses(new string[] { ":visited" })]
public class HyperlinkButton : Button, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, ICommandSource
- Inheritance
-
HyperlinkButton
- Implements
- Inherited Members
- Extension Methods
Constructors
HyperlinkButton()
Initializes a new instance of the HyperlinkButton class.
public HyperlinkButton()
Fields
IsVisitedProperty
Defines the IsVisited property.
public static readonly StyledProperty<bool> IsVisitedProperty
Field Value
NavigateUriProperty
Defines the NavigateUri property.
public static readonly StyledProperty<Uri?> NavigateUriProperty
Field Value
- StyledProperty<Uri>
Properties
IsVisited
Gets or sets a value indicating whether the NavigateUri has been visited.
public bool IsVisited { get; set; }
Property Value
NavigateUri
Gets or sets the Uniform Resource Identifier (URI) automatically navigated to when the HyperlinkButton is clicked.
public Uri? NavigateUri { get; set; }
Property Value
- Uri
Remarks
The URI may be any website or file location that can be launched using the ILauncher service.
If a URI should not be automatically launched, leave this property unset and use the
Click and IsVisited members directly.
Methods
OnClick()
Invokes the Click event.
protected override void OnClick()
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.