You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we assign a list that doesn't raise change notifications to ContextMenu.Items and then add MenuItems to that list, the items get displayed but they don't display correct hover behavior:
var b = this.FindControl<Border>("b");
var c = b.ContextMenu;
var items = new List<MenuItem>();
var item = new MenuItem { Header = "foo" };
c.Items = items;
// `items` doesn't raise a `CollectionChanged` event
items.Add(item);
Now, it's incorrect to do this, but the result is hard to debug. See if we can do better here either by throwing or by recovering the situation.
The text was updated successfully, but these errors were encountered:
The problem here is the ItemsControl.ItemCount is only updated when a collection changed event is fired, so when it comes to select the first item, ItemCount == 0 meaning it thinks index 0 is invalid.
We should fix this in #3388 by moving to ItemsSourceView.
If we assign a list that doesn't raise change notifications to
ContextMenu.Items
and then addMenuItems
to that list, the items get displayed but they don't display correct hover behavior:Now, it's incorrect to do this, but the result is hard to debug. See if we can do better here either by throwing or by recovering the situation.
The text was updated successfully, but these errors were encountered: