desktopalert & hyperlink

2 Answers 127 Views
DesktopAlert
m
Top achievements
Rank 1
Iron
m asked on 01 Sep 2021, 07:00 PM

Hi

Can I add hyperlink to desktopalert dynamically?

thank you

2 Answers, 1 is accepted

Sort by
1
Accepted
Stenly
Telerik team
answered on 03 Sep 2021, 04:35 PM

Hello M,

To add a hyperlink in the RadDesktopAlert control, you could set the Content property to a button instance of type RadHyperlinkButton. And then set the button's NavigateUri and Content properties to be equal to the passed URL

var hyperlinkBtn = new RadHyperlinkButton();
hyperlinkBtn.NavigateUri = new Uri("passed uri");
hyperlinkBtn.Content = "passed uri";
hyperlinkBtn.Foreground = Brushes.Black;

var alert = new RadDesktopAlert
{
    Content = hyperlinkBtn,
};

That said, I have prepared a sample project which implements the mentioned approach, so I hope it helps in your scenario.

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

m
Top achievements
Rank 1
Iron
commented on 08 Sep 2021, 06:44 AM | edited

.
0
m
Top achievements
Rank 1
Iron
answered on 08 Sep 2021, 06:45 AM

Very good

Can I Add multi Control (hyperlink , label, ...) to Content properties?

Than you

Stenly
Telerik team
commented on 08 Sep 2021, 03:54 PM

You can create a custom data template and set it to the ContentTemplate property of the RadDesktopAlert control. That said, I have modified the project from the last ticket reply, to implement the aforementioned approach.
Tags
DesktopAlert
Asked by
m
Top achievements
Rank 1
Iron
Answers by
Stenly
Telerik team
m
Top achievements
Rank 1
Iron
Share this question
or