I want to place a link inside the description field of my applications about box which will direct users to a wiki page for more help. I can't figure out how to make the address appear as a link.
I set the description through the assembly information properties.
There's a WinForms control you can use to achieve what you want: the LinkLabel
.
Simply add one to your AboutBox layout and double click it. A handler to its LinkClicked event will be created, and there you can then use Process.Start
to open your website's URL.
public AboutBox1()
{
InitializeComponent();
this.Text = String.Format("About {0}", AssemblyTitle);
this.labelProductName.Text = AssemblyProduct;
this.labelVersion.Text = String.Format("Version {0}", AssemblyVersion);
this.labelCopyright.Text = AssemblyCopyright;
this.labelCompanyName.Text = AssemblyCompany;
this.textBoxDescription.Text = AssemblyDescription;
this.Link.Text = "Visit our website!";
this.Link.Tag = WpfApplication2.Properties.Resources.website;
}
private void Link_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start((sender as LinkLabel).Tag.ToString());
}
In my case, I've saved the URL as an application resource. And I've showed it separately from the Assembly Description.
If you want the link to appear inside the Assembly Description, it's quite a bit more complicated...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With