0

Can I use one of these link-like buttons in a WinForms app (e.g. "Control Panel Home", "Add a Device" etc. see pic)?

In Windows 7+ settings they are everywhere. I wonder that must be a common control? If you hover over them they are highlighted and underlined. You click on them you fire an event etc. LinkLabel behaves differently and I can't find LinkButton in .NET.

enter image description here

Bitterblue
  • 13,162
  • 17
  • 86
  • 124
  • Which exactly control do you need? There are several different on the picture. "Text which you click" is basically any control able to display text + [`Click`](https://msdn.microsoft.com/en-us/library/system.windows.forms.control.click(v=vs.110).aspx) event. – Sinatr Feb 08 '17 at 10:32
  • @Sinatr Let's say one with the least extra work. – Bitterblue Feb 08 '17 at 10:35
  • 1
    Have a look at [this one](http://stackoverflow.com/a/17524999/1997232) and tell what it lacks. – Sinatr Feb 08 '17 at 10:36
  • @Sinatr It lacks hover over highlighting. – Bitterblue Feb 08 '17 at 10:43
  • 2
    @Bitterblue Use a [LinkLabel](https://msdn.microsoft.com/en-us/library/system.windows.forms.linklabel(v=vs.110).aspx)?! – Markus Deibel Feb 08 '17 at 10:46
  • What effect do you want for highlighting? Highlighting is made by handling `MouseEnter` + `MouseLeave` events, but depends on what should happens with control the solution will vary. – Sinatr Feb 08 '17 at 10:51
  • @Sinatr The very same as in Windows Control Panel. – Bitterblue Feb 08 '17 at 10:57

2 Answers2

1

I believe that the LinkLabel control is what you want.

To get it to behave like the Control Panel, set it's LinkBehavior property to HoverUnderline

Chris Dunaway
  • 10,974
  • 4
  • 36
  • 48
0

You can try to use DotNetBars and choice controls best for you.

Marco Luongo
  • 397
  • 4
  • 13