This commit is contained in:
Frank Skare
2019-03-25 23:25:51 +01:00
parent 07b6d4379e
commit 77ba7f105c
22 changed files with 114 additions and 207 deletions

View File

@@ -0,0 +1,24 @@
using System;
using System.Diagnostics;
using System.Windows.Documents;
using System.Windows.Navigation;
namespace DynamicGUI
{
public class HyperlinkEx : Hyperlink
{
private void HyperLinkEx_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
Process.Start(e.Uri.AbsoluteUri);
}
public void SetURL(string url)
{
if (string.IsNullOrEmpty(url)) return;
NavigateUri = new Uri(url);
RequestNavigate += HyperLinkEx_RequestNavigate;
Inlines.Clear();
Inlines.Add(url);
}
}
}