I have not tried this with GroupBox, but I think you can do something similar to the Button example here.
http://msdn.microsoft.com/en-us/library/7h62478z(v=vs.90).aspx
Just create a new class, name it MyGroupBox or whatever:
public class MyGroupBox : GroupBox { private string link; public string Link {get {return link;} set{link=value;} } }
Inherits all GroupBox behavior / properties and adds a new property for Link.
Then you can simply use it as follows:
MyGroupBox groupBox = new MyGroupBox(); groupBox.Link = "www.google.com";
I think this is cleaner than using the tag property, honestly. Mostly because itβs not a tag, itβs a link, and I like being able to name the property correctly. :) Although the tag may be easier if you need to do this for many controls, not just GroupBox.
source share