Skip to content

TrackBar UI control doesn't reflect properties #14693

Description

@sunstriderko

.NET version

.NET 10

Did it work in .NET Framework?

Yes

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

.NET 7

Issue description

While working on our app, I noticed something wrong with the default Winforms TrackBar control.
We are moving our app to build on .NET 10 version and there are 2 issues with the visual representation of the ticks in the TrackBar control.
Both issues are visible only during runtime of an app.

  1. TrackBar is missing the second to last tick
  2. The number of TrackBar ticks is incorrect after resize of the trackbar. You need to reset Tick Frequency to something else and back to have the correct number of ticks.

Steps to reproduce

Steps to reproduce

  1. Issue:
  • Create a new Winforms App building on .NET 10
  • Add a TrackBar
  • Resize it to 500 width
  • set Maximum to 500
  • set Tick Frequency to 50
  • Run the app
    Notice the second to last tick is missing.
  1. Issue:
  • Create a new Winforms App building on .NET 10
  • Add a TrackBar
  • add 3 buttons
  • set Maximum of the TrackBar to 200
  • create an event handling method for Button 1 click which sets the Width of Track Bar to 500
  • create an event handling method for Button 2 click which sets the Tick Frequency of the Track Bar to 2
  • create an event handling method for Button 2 click which sets the Tick Frequency of the Track Bar (back) to 1
  • run the app
  • Click "Width" Button
  • Click "Tick Frequency to 2" Button
  • Click "Tick Frequency to 1" Button
    Notice there is much more ticks than when it was after the resize step. Even though we just reset the Tick Frequency to 1.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    untriagedThe team needs to look at this issue in the next triage

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions