-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selection Model Issues #4496
Comments
grokys
added a commit
that referenced
this issue
Aug 17, 2020
Both of these issues are related but the second is the most interesting (and hardest to fix). The following unit test demonstrates the problem: [Fact]
public void Binding_SelectedIndex_Does_Not_Cause_ArgumentOutOfRange()
{
// Issue #4496 (part 2)
var items = new ObservableCollection<string>();
var other = new ListBox
{
Template = Template(),
Items = items,
SelectionMode = SelectionMode.AlwaysSelected,
};
var target = new ListBox
{
Template = Template(),
Items = items,
[!ListBox.SelectedIndexProperty] = other[!ListBox.SelectedIndexProperty],
};
target.ApplyTemplate();
target.Presenter.ApplyTemplate();
other.ApplyTemplate();
other.Presenter.ApplyTemplate();
items.Add("Foo");
} What happens is:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-- more to come.
The text was updated successfully, but these errors were encountered: