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
{{ message }}
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.
When a Tab is moved from the application to the desktop, it works fine. Other tabs may now also be moved to the new window. You may also move tabs back to the original window, but when you try to move the last desktop tab back to the main application window, an exception occurs in MainPage.xaml.cs Items_DragItemsCompleted.
Details:
System.ArgumentException
HResult=0x80070057
Message=Value does not fall within the expected range.
Source=
StackTrace:
at Windows.UI.Xaml.Controls.Primitives.Selector.put_SelectedIndex(Int32 value)
at Microsoft.Toolkit.Uwp.UI.Controls.TabView.OnItemsChanged(Object e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at TabViewTear.Views.MainPage.<Items_DragItemsCompleted>d__19.MoveNext()
For fun, I am going to try to fix it.
The text was updated successfully, but these errors were encountered:
PaulaScholz
changed the title
Redocking last TTab causes exception.
Redocking last Tab causes exception.
Nov 20, 2018
Thanks for the report @PaulaScholz, looks like an issue on builds before 17763, I'll have to spin up a VM after the holiday and take a look in more depth.
I would imagine this is a timing issue with the tab not being put back from the drag operation to remove again, there's some oddness with how dragging works there. I wonder if we dispatch the code in the DragItemsCompleted to the next cycle if it'd fix it or not.
Interestingly, putting TabItems.RemoveAt(value); in a Try/Catch block and eating the exception clears up the behavior and the app then operates normally.
But, eating exceptions is no way to live your life. Unhandled exceptions taste horrible.
"If you eat the exception, it'll work." - Famous Last Words
I have the sample running on a 16299 VM and can repro the issue now. I was slowed down a bit by a toolkit issue, but I think I have a resolution for that.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When a Tab is moved from the application to the desktop, it works fine. Other tabs may now also be moved to the new window. You may also move tabs back to the original window, but when you try to move the last desktop tab back to the main application window, an exception occurs in MainPage.xaml.cs Items_DragItemsCompleted.
Details:
System.ArgumentException
HResult=0x80070057
Message=Value does not fall within the expected range.
Source=
StackTrace:
at Windows.UI.Xaml.Controls.Primitives.Selector.put_SelectedIndex(Int32 value)
at Microsoft.Toolkit.Uwp.UI.Controls.TabView.OnItemsChanged(Object e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at TabViewTear.Views.MainPage.<Items_DragItemsCompleted>d__19.MoveNext()
For fun, I am going to try to fix it.
The text was updated successfully, but these errors were encountered: