Skip to content

[NodeLeading] TreeView row spacing collapses when NodeLeading is set between 0.0 and 1.0 #14791

Description

@Olina-Zhang

.NET version

.NET 11.0.100-preview.7.26365.114 + Private dlls built from Net11/Integration-3 branch of https://github.com/KlausLoeffelmann/winforms repo

Did it work in .NET Framework?

Not tested/verified

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

Not support, new feature of #14768

Issue description

When TreeView.NodeLeading is set to a floating-point value between 0.0 and 1.0 (for example, 0.2, 0.5, or 0.8), the spacing between TreeView nodes becomes noticeably compressed, making the nodes appear crowded.

Interestingly, this issue does not occur when NodeLeading is exactly 0.0 (legacy behavior) or exactly 1.0 (honest row-height). The unexpected behavior only occurs for values strictly between 0.0 and 1.0.

Image

Steps to reproduce

  1. Create a WinForms application targeting .NET 11.
  2. Add several TreeViews with multiple nodes.
  3. Set TreeView.NodeLeading to different values:
  • 0.0
  • 0.5
  • 1.0
  • 2.0
  1. Compare the spacing between adjacent nodes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NewApi-Net11Tracks issues for public APIs targeted for .NET 11.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions