I do the following navigation pattern:
Navigate into the app (and it's main view)
Go into a detail view that fetches something from a REST server (that is - it shows a progress indicator for a few seconds)
While progress indicator still is shown, I click the back-button twice in quick succession (easy to do by mistake)
The app returns to the main view, but with the content of the detail view superimposed on it.
A screenshot of the resulting mess is shown below.
This was recreated both on a Nokia Lumia 800 and HTC Titan.
First of all - what the h..? And is there anything I could have done to make this happen?
There is no exceptions (or anything else) shown in the output. The only thing happening in the OnNavigatedFrom() method of the detail view is nulling out the background image (for memory reasons). It happens in other views as well.
My idea is that the draw method on both views are called on different threads, leaving only the main view to be responsive.
Any idea as to what has happened here, and how I can fix this bug?
This type of issue happened to me when using TransitionFrame from Silverlight for Windows Phone toolkit. Using transitions when navigating from page to page can cause this if the user taps on back button once or twice while the transition/navigation is in progress.
I believe it's a bug, but couldn't find it reported at the official CodePlex site of the toolkit, therefore I don't know about any reliable solution or workaround except trying to handle the back button press on the page that's causing issues. In other words, catching the back button/key press and either disabling it (I'm not sure that this would pass certification!), or simply prompting user with a MessageBox that the page is still loading and if they are sure that they want to navigate back, might work for you.
Other solution I can think of is that you avoid using TransitionFrame, but that's not really a solution, right? :)
Related
I'm keep getting the feedback that one WinForms control is rendered as blank (no window title, no button text, etc.) as can be seen in the screenshot below. This is a rare issue that seems to happen only after the application runs for a very long time. I am not even able to reproduce it so I assume the UI code is not the problem hence I don't post it here.
I'm wondering if this has to do with windows running out of window handles, or something else? Any advices why this could happen?
I am trying out Prism.Forms for my next client project. Unfortunately, I am seeing a strange behavior with my samples.
Pretext
It seems like XF or Prism does not like me including an existing XAML page (also mentioned by Brian Lagunas - The man - himself at the Evolve session). But renaming a page also throws it off and the ViewModelLocator can't seem to locate the ViewModel anymore. Even if I re-create the page with same name, It can't find it ViewModel. Manually setting the BindingContext works, but I am trying not to create my dependencies for constructor injection.
Question
While working on existing code, a minor change caused NullReference exception when using NavigationPage as a root. Here is an example of a working sample app
https://github.com/hnabbasi/xamarin/tree/master/XFPrism/XFPrism
I am using a NavigationPage and pushing a ContentPage. Then I push another ContentPage, then I show a Modal page via button click and communicate. I send parameters back to Second content page via NavigationParameters.
To break it, simply try to swap the ISayHello service with IPageDialogService. I am not sure what's going on that's breaking it.
Thanks in advance :)
The INavigationService is a named type and as I recall a known limitation of Unity is that named types must precede unnamed types.
As mentioned by Dan S. in the comments. The MainPage is not set when I was calling the PageDialogService to display the alert, hence the NullReference.
In case you really need to do something like this where you want to somehow wait for something to finish before doing an operation, try Task.Yield().
I fixed my scenario as below,
// will yield for current operation of page appearing
await Task.Yield();
// by now, the page has appeared and set, so this should work fine
SayHiCommand.Execute(this);
I have used this workaround in the past. If you know a better way of handing this, please comment away.
I am working on a windows phone app (really big one) that has at least 60 different pages, on some navigation i am getting a "out of memory error". This is usually happening on the last pages (on the navigation flow). I am using NavigationService.navigate("MyURL"); to go move to the next page and NavigationService.goback(); to navigate to a the page before, there is any better approach for this type of navigation?
If am not clear enough please tell me(English is not my first language)
Well for this problem after a few weeks I create a Navigation manager and start deleting the unwanted back stack with that y reduce the problem, after that did some edits to the Picture View Class instead of allowing the user to rotate de picture and all, just present the picture, so far a haven’t see that error again
I have implemented the Facebook Like and Send button plugin. Look I think its fair to say that this should be fairly straightforward and having stepped though the process I was very happy that this was the case.
I am having an issue now that is causing me some difficulty resolving.
The issue is around an inconsistent display and functionality of the plugin. It works perfectly for some of our site pages and doesnt work at all for others.
On the pages where the plugin does not work the Send Button doesnt appear and when the Like Button is clicked it opens the Like Dialog very briefly and immediately closes it without any Like Action being recorded
I have checked all of the site pages through the Facebook Debugger tool and all the pages are being scraped correctly with correct Open Graph Meta Tags etc...
At this stage I am wondering if anybody has had this issue? I am aware that there were issues with the Send Button this year but my understanding was that these issues had been resolved...
website url that displays incorrectly is: http://www.todaysdeals.ie/Deal.aspx?dlid=441
website url that displays correctly is: http://www.todaysdeals.ie/Deal.aspx?dlid=439
It looks to me like the problem is in how you're declaring the button code. You've specified a width of 90px in the FBXML code, but Facebook seems to be ignoring this and rendering its code at 150px.
My guess is on the incorrect page, you've got a large number of likes on this page, and it's wrapping the buttons into a hidden area of the div.
I'd start by increasing the width in your FBXML code to at least 176px and see what happens.
i have a C# app that registers a protocol. When you click BLAH://djfhgjfdghjkd in a browser it launches my app. However you can click multiple links and each link is a note added into the app.
How can i inform the user that he did fully click the link? Right now i have a console app showing up for 1sec (basically pops up and goes away as fast as possible) which felt better then a hidden console since you are unsure if it went through. The 1 second takes a lot of time when you are trying to rapidly click many notes/links and the console gets in the way. What can i do that is noticeable?
I'm thinking have a box that comes up (and is semi transparent) but the click passes through it. Maybe there is a better way? Also i wouldnt know where to start with transparent windows or pass through clicks
I'd look at putting an icon in the SysTray, combined with balloon tips, that's the Windows way I think. Especially since it's even been renamed to the Notification Area.
Look at the NotifyIcon Class.