Skip to content

StepBar click events not updated after ItemsSource changes #1468

@VagyokC4

Description

@VagyokC4

Describe the bug

I've encountered an issue with the StepBar control where the click events do not update properly after changes in its ItemsSource property. When the ItemsSource property is updated, the display of the control is refreshed, but the click events are still wired up to the old locations of where the step bar items were. This causes inconsistencies between the displayed control and the click events.

Steps to reproduce the bug

  1. Create a new WPF application and add the HandyControls library.
  2. Add a StepBar control to the main window.
  3. Bind the ItemsSource property of the StepBar to an ObservableCollection in the ViewModel.
  4. Add a button to the main window that updates the ItemsSource by adding or removing StepBarItem objects in the ViewModel.

Expected behavior

When the ItemsSource property is updated, the StepBar should refresh its display to reflect the changes in the data, and the click events and progress bar should be updated to match the new locations of the step bar items.

Screenshots

The StepBar refreshes its display when the ItemsSource is updated, but the click events remain tied to the old locations of where the step bar items were. This causes the new step bar click events to be misaligned with the displayed UI.

bandicam.2023-04-11.14-16-38-828.mp4

NuGet package version

HandyControls (Custom version) 3.4.0

IDE

Visual Studio 2022-preview

Framework type

.Net 6.0

Windows version

May 2021 Update (19043)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions