I am developing a Windows CE app with Microsoft Compact Framework. I have to use a LinkLabel and it has to be white and no underline.
So in the designer, I modified font color by white and unchecked "underline" in the font dialog.
However, when I run the application, the font is still blue and underlined.
Is there a way to remove the underline of a LinkLabel and change its color?
You can use LinkBehavior
:
Me.linkLabel1.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline;
It wont be visible in the designer at Design-Time but will be correct in Runtime.
Otherwise do it in Code (which should be the same as the designers code):
Font f = LinkLabel1.Font;
LinkLabel1.Font = New Font(f, f.Style && !FontStyle.Underline)
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