Skip to content

Latest commit

 

History

History
74 lines (49 loc) · 1.8 KB

File metadata and controls

74 lines (49 loc) · 1.8 KB
title DetailsLink Constructors
description Initializes a new instance of the DetailsLink class.
ms.date 2/25/2025
ms.topic reference
no-loc
PowerToys
Windows
Insider

DetailsLink Constructors

DetailsLink() Constructor

Definition

Namespace: Microsoft.CommandPalette.Extensions.Toolkit

Initializes a new instance of the DetailsLink class.

public DetailsLink()
    {
    }

DetailsLink(String) Constructor

Definition

Namespace: Microsoft.CommandPalette.Extensions.Toolkit

Initializes a new instance of the DetailsLink class, setting its Link and Text properties to url.

public DetailsLink(string url)
        : this(url, url)
    {
    }

Parameters

url String

The URL to be set as both the link and text for the DetailsLink instance.

DetailsLink(String, String) Constructor

Definition

Namespace: Microsoft.CommandPalette.Extensions.Toolkit

Initializes a new instance of the DetailsLink class, setting its Link property to url and Text to text.

public DetailsLink(string url, string text)
    {
        if (Uri.TryCreate(url, default(UriCreationOptions), out var newUri))
        {
            Link = newUri;
        }

        Text = text;
    }

Parameters

url String

The URL to be set as the link for the DetailsLink instance.

text String

The text to be displayed for the link in the Command Palette. This text is what users will see and click on to access the link.