I would like to add in coding to change my "next" button into a "loading" Gif while it loads the next page. Apologies for the ignorant question but does that code go in the current page with the "next" button or does it go in the page to be loaded ? Essentially i would like it to display in the current page as the new page to be loaded looks completely different.
So in short, button says "next", they click it, it says "loading" once the new page is complete it must then reroute to that page.
Thanks in advance.
Related
I have a masterdetailview that uses prism. When I click on one of the menu items the hamburger menu shows up on the nav bar of the new page I clicked and I really just want the top nav bar to show a back button and be able to go back. How can I achieve this ?
When my app loads I call
await NavigationService.NavigateAsync("/MainPage/NavigationPage");
I figured I could call
await NavigationService.NavigateAsync("/MainPage/NavigationPage/InviteFriends");
and this would provide the newpage with a back button to Home but when I do this it doesn't do anything
EDIT
if I change to
await NavigationService.NavigateAsync("/MainPage/NavigationPage/FeaturePage");
which is what the home page will be called(Feature Page) it will not load the page at all.
MainPage is my list of other pages to go to that is shown when the hamburger is pressed if that helps. Feature page is the page I would want to show below the hamburger page and be the "Home" screen.
am I doing that correctly ?
So if we take your example you have the following Navigation Stack:
MainPage/NavigationPage
Let's assume your navigation code looks like this in the Master-Detail View Model
await NavigationService.NavigateAsync("/MainPage/NavigationPage/InviteFriends");
This will lead to the following Navigation Stack:
/MainPage/NavigationPage/InviteFriends
This is because the navigation was called from the master-detail page.
The master-detail page is considered a root page in Prism and when navigating from a Master-detail page it will set the target page as the detail page of the master-detail.
Check out this article for a more detailed breakdown Link
Be careful - Starting with /MainPage will clear the Navigation stack
One quick solution to this is to add your homepage to the navigation call:
await NavigationService.NavigateAsync("MainPage/NavigationPage/HomePage/InviteFriends");
This will create the following:
MasterDetailPage/NavigationPage/HomePage/InviteFriends
This should hopefully create the response you are looking for.
Hope this helped. Happy coding!
EDIT:
I think if you separate your initial Detail Page out into its own file you should then be able to do the following:
await NavigationService.NavigateAsync("MainPage/NavigationPage/HomePage/InviteFriends");
I have a WebView, which gets a HtmlWebViewSource as content:
this.webView.Source = new HtmlWebViewSource
{
Html = "<p>some html string</p><a href='http://www.google.com'>External link</a>",
};
If I navigate away (by clicking on an external link added to the content before) and then call GoBack() I get an empty white screen. It seems that the source is overwritten by clicking on the link.
Because the content I show isn't 100% static, I can't use a local html page as an URL. What should I do? I tried to set the BaseUrl without success. Furthermore, I thought I can use OnAppearing() or the Navigated event, to reload my initial content, but the events are not realiable called as I would expect.
Caveat: I've only tested this with Android (simulator and device).
PS: Other things I encountered:
Loading a page (through clicking on the external link) seems sometimes to work and sometimes not on the simulator (and it takes too much time).
CanGoBack is only true if the page has been fully loaded. Otherwise you get false, despite the content is already shown on the screen (but not fully loaded).
Navigated seems to be called too late (e.g. the page was popped off already).
Checking for CanGoBack in Navigated is not really possible, because of the different async times.
Navigating back seems not to be a good idea at all. Because of the here described issues it is not possible to include a back button, which reliably first navigates back if possible and finally dismisses the page.
WebView doesn't open a PDF file, when linked to
I am developing an APP using Xamarin, i trying to apply an consistent navigation system for my app.
I have used xamarin master detail navigation and binded the master page with few details page through ObservableCollection list.
My default details page is again a tabbled page. Within Tabled page on click of some button i need open some content page which are not part of master page.
What i want is- any conent page should open within the master page means from any content page master page's header and left sliding menu should be easily available to user.
I am tryng to bind master page from content page on runtime but no luck yet. Please help.
====updating my query for better understanding===
1. Sample master details page look like below
[1
Click on item 1 open page 1 with sliding icon on left side of page title
Click on "GO TO PAGE 3" open page 3 with navigation back button. I think as this page is not bind to master page it shows normal back button. Basically i want to replace this navigation back button with "master detail" sliding button in every page those are not part of master page.
Please let me know how to replace navigation back button icon and behavior with master detail sliding button. I know following line of code can be used to open sliding menu but do not know how to hook the back button even.
(App.Current.MainPage as MasterDetailPage).IsPresented = true;
I have events set to fire throughout the website on button and link clicks etc.
For this particular button, on click, the page loads, displays for a second the GA Debugg output and then redirects to a new page before I've had a chance to read the output from the button click event.
Is there a way in GA Debugger to view the last pages output?
I'd suggest installing the ObservePoint plugin - you can enable a "persistent" mode that won't clear the console on page refresh.
https://lh6.googleusercontent.com/lKLkVzXtUv5vKaUkGr7XcuDp4fPfKpjd9vS7xl0Ci9N7WUY1Jvt6t4CNfxWLqYn6pOMG1j9F=s640-h400-e365-rw
ObservePoint doesn't format the GA params as nicely as the debugger, but it's serviceable.
I have a webapp that store a layout,
And on its edit mode the user should click on the layout option inside a jquery ui dialog.
After the user choose the template that he/she want, the page will automatically reload.
I want the jquery-ui keep open even after the page was reloaded...
Hope it makes sense.
Hoping for your replys.
King Pangilinan
I guess your whole page is being reloaded? If so you can't keep the dialog open but re-open it when your dom has been loaded. To do so you can do:
$(document).ready(function() {
$("dialog_selector").dialog('open');
});
That just opens it. Now if you want to do it on a page reload you would have to embed this javascript code in some conditional ERB-code (if you're using ERB) or similar which meets your conditions...
Hope it's clear what I mean.