Comments (9)
It works fine for me in the current version 2.4.1-beta (latest source code)... Clone the latest source code and run the SampleUwpApp or SampleWindowsStoreApp in debug mode and check the navigation events in the Visual Studio output. Do you see the same problems?
from mytoolkit.
We upgraded to 2.4.0 and are still seeing the issue. Investigating further...
from mytoolkit.
To give some context around this - our app is structured such that we allow random access navigation to the various views. When navigating, we first check to see if the requested target page is already on the stack. if so, we pop the intermediate pages and then navigate back to the target page. if not, we navigate forward to the target.
code:
public async void NavigateToView(IView currentView, Type newViewType, IViewContext context)
{
MtPageDescription pageDescription = currentView.Frame.GetNearestPageOfTypeInBackStack(newViewType);
if (pageDescription != null)
{
if (currentView.Frame.CurrentPage != pageDescription)
{
// Remove pages from stack until reaching the desired one.
// http://stackoverflow.com/questions/29127993/mtframe-gobacktoasync-pop-or-navigate-back-to-nth-page-without-loading-n-1-pages
while (currentView.Frame.PreviousPage != pageDescription)
{
currentView.Frame.RemovePageFromStackAt(currentView.Frame.CurrentIndex - 1);
}
if (currentView.Frame.CanGoBack)
// debugger stepthrough shows this is being called when nav requested from Page2 to Page1
await currentView.Frame.GoBackAsync()
}
}
await currentView.Frame.NavigateAsync(newViewType, context);
}
from mytoolkit.
Looks good without testing... However, have you tried to use GoBackToAsync?
from mytoolkit.
FYI: In the next version there will be a method to move a given page to the top of the stack without removing pages in between...
from mytoolkit.
Interesting, we'll try GoBackToAsync()
and see if we see the same behavior.
from mytoolkit.
Turns out it was a bug in our nav method. After navigating back to the target view, we were still navigating forward to the target view.
public async void NavigateToView(IView currentView, Type newViewType, IViewContext context)
{
MtPageDescription pageDescription = currentView.Frame.GetNearestPageOfTypeInBackStack(newViewType);
if (pageDescription != null)
{
if (currentView.Frame.CurrentPage != pageDescription)
{
// nav backward - correct
}
}
// nav forward - there should be an else wrapping the following statement
await currentView.Frame.NavigateAsync(newViewType, context);
}
from mytoolkit.
Ok, so this issue can be closed?
from mytoolkit.
Yes sir. Thanks for your help. We did switch to GoBackToAsync() and it seems to be working as well, nice add.
from mytoolkit.
Related Issues (20)
- How to use SemanticZoom with ObservableCollectionView
- object reference not set to an instance of an object. HOT 1
- MtObservableCollection.AddRange throws an exception HOT 6
- YouTube Links Not Working HOT 12
- MyToolkit.Multimedia.YouTubeUriNotFoundException: 'No matching YouTube video or audio stream URI could be found. The video may not be available in your country, is private or uses RTMPE (protected streaming).' HOT 1
- Can't set DataGrid.ItemsSource to IncrementalLoadingCollection
- .Net Standard 2.1 Compatibility For Collections
- Color Contrast
- Is this related to the ancient "My ToolKit"?
- UWP Can't play some YouTube link on mediaelement HOT 1
- YouTube Live Streams? HOT 1
- Row color
- .Net Core 2.0 incompatibility with MyToolkit.Html for MVC HOT 1
- Memory leak ?
- Unhandled Exception MyToolkit.Extended DataGridTemplatedColumn
- .Net Standard 2.0 Support HOT 4
- Update required?
- mytoolkit extended datagrid is supported touch screen monitors?
- GetSetting: Delete file when reading fails
- UWP/XAML Controls are not present HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mytoolkit.