コード例 #1
0
        public void GoBack <T>() where T : IViewModelBase
        {
            // navigation
            var dumpBefore = _backStack.Dump(ToKey);

            _backStack.GoBackWhile(x => !(ExtractViewModel(x) is T));

            var dumpAfter = _backStack.Dump(ToKey);

            var fragmentNamesForRemove = dumpBefore.Except(dumpAfter).ToArray();

            // cleanup
            CurrentStore.Remove(fragmentNamesForRemove);

            // show
            RestoreNavigation();
        }