Skip to content

FontStyle.Bold Not Visually Applied to LinkLabel at Runtime via Code #13677

@Olina-Zhang

Description

@Olina-Zhang

.NET version

10.0.100-preview.7.25351.106

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Work in .NET 6, regression from .NET 7 to the latest .NET 10

Issue description

When changing a LinkLabel control's font to bold programmatically at runtime using FontStyle.Bold, the change is not visually reflected in the UI. This occurs even though the Font object reports Bold = true in the debugger.

.NET 7 to .NET 10:

Image

.NET 6:

Image

Steps to reproduce

  1. Use a LinkLabel with the default Microsoft Segoe UI font
  2. At runtime, execute:
    linkLabel1.Font = new Font(linkLabel1.Font, FontStyle.Bold);
  3. Observe font style for linkLabel

WinFormsApp73.zip

Expected Behavior:
Text in the LinkLabel should appear bold after setting FontStyle.Bold via code at runtime.

Actual Behavior:
The text continues to appear in regular style, despite the Font.Bold property being true.

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions