Skip to content

Possible bug: initial SelectedItem is never respected #3

@GeertvanHorrik

Description

@GeertvanHorrik

When assigning SelectedItem via xaml, the item containers are not generated yet, so GetItemContainerForObject returns null. After that, binding to the SelectedItem is impossible because it's not a dependency property.

A possible fix would be:

  1. Convert SelectedItem to a dependency property
  2. Check if ItemsSource.Count == items.Count, if not, dispatcher and try again later

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions