Xamarin Forms - Modal "Wizard" UX - xamarin.forms

Xamarin Forms
iOS
Android
FreshMVVM
We have a standard non modal flow in our app that captures data from Bluetooth devices. However if the user tries to capture data of a type where we have no configured Device we jump out to a Modal page and ask them to set one up.
That modal flow could be from 2 to 5 pages long depending on the device.
Is Modal the right choice? It is an unfriendly stack to deal with
Once you take the user into a modal flow of more than one page should each page be a new Modal page
pushed onto the Modal stack? I am wondering if once in the Modal page i do "page-like" transitions within a single ContentPage

Is Modal the right choice? It is an unfriendly stack to deal with
That depneds on the needs of scene . To my knowledge , Modal page could be a good choice . If not need to navigate to too many pages later , Modal page will be the suggested choice .
Once you take the user into a modal flow of more than one page should each page be a new Modal page pushed onto the Modal stack? I am wondering if once in the Modal page i do "page-like" transitions within a single ContentPage
If there are more than one pages need to navigate ,the new Modal page will be pushed onto the Modal stack .
Therefore , if there are too much needs to use more than one page , not doing that . I'm not knowing of the scene in your project .From shared logic , the Modal page need to configure the info of bluetooth device . I will use some paging controls inside one Modal page to do , such as ListView , CollectionView, and CarouselView etc.
Even though using Normal page, also will recommand to use paging controls to solve the scene which needs much pages. This will make your app has a better user experience .

Related

Okay to open modal via anchor with valid href?

We have a bunch of modal dialogs in our application. When a user clicks a button it fetches the modal content from the server and displays it to the user. The way that it is structured, in order to fetch the content from the server, the button is nested inside of a form tag with an action specifying the URL to fetch the modal from. Because we can't nest form tags, this severely limits where we can place modal toggles without doing a lot of CSS trickery.
So, I'm wondering if it is acceptable from an accessibility standpoint to use an anchor tag with a valid href to display the modal. We'll intercept the click with JavaScript, fetch the content via ajax, and display it on the modal. If JavaScript isn't working or the user opens the link in a new tab, they'll still see the modal content, just with a sparse layout.
Is this a reasonable and accessible approach to take? It seems like as long as the anchor has a valid href it should be fine, and provides a tiny bit more flexibility to the user if they want to open up the link in a new tab.

Simple page container

Is it possible to have a simple ContentPage or something similar that hosts another page without any of the frills that come with tab page or navigation page? I want this host page to be essentially invisible.
The idea is to pop up a login modal on the root page and then, when the user has logged in, switch the contents in the background so that when the login page is popped off, it reveals new content.
If you want the NavigationStack available so you can push & pop pages, you need to use NavigationPage. You have a couple of reasonable options though:
Reassign Application.Current.MainPage whenever you want a page transition. This won't create a page stack, but will show the new content when reassigned without animation. So rather than thinking about a login modal then popping it off, just set the current page to the login page, then on login, set the current page to the content you want the user to see.
Use a NavigationPage as the Application.Current.MainPage, but then call SetHasNavigationBar(page, false) to avoid the extra elements that come with NavigationPage. You may need to call NavigationPage.SetHasBackButton(page, false); for every page you push on the stack to avoid the back button.

Prism.Forms : How to dispose the page that has been navigated from?

[Xamarin.Forms]
I have a case where I am on the sign in page and after the user press sign in button I use the navigation service to go to the MainPage. The problem is that "LoginPage" is still active and receives and interacts with events, such as the login button would be pressed if I press "Enter" from the keyboard or the remove control .
So is there a way to get rid of the "LoginPage" so it does not listen to keyboard events (provided by default in Android) .
Otherwise , is there a way to dispose the "LoginPage" After I navigate from it ?
Navigating away from a view to another using Prism's INavigationService.NavigateAsync does not remove the page from the navigation stack. It simply pushes another view onto the stack. Therefore it will not be GC'd. You must remove the page from the navigation stack by either using an absolute URI when navigating, or to use XF's APIs to remove the page manually.

how to create a pop up window #2

is there a way to create a pop-up window in a VB.Net application, specifically when a button has been clicked?
I'm designing a little help section on a web application I'm working on, and I wanted to have a variety of written steps followed by some sort of "Click here for an example" button that brings up a new window (not a new page, just a new window). The window would simply contain an image control displaying a picture that describes the written steps.
The best example I can come up with is here on Amazon when ordering a clothing item such as a pair of shoes. When the user clicks the "Sizing Info" link button, a pop-up window appears with information to help you order the correct size.
So is there a way to create a pop up like that in VB.Net?
In vb.net not, websites are handled differently. For displaying a popup using asp.net you need a client-side language, like javascript.
For instance this nice jquery script http://jqueryui.com/dialog/
Your vb.net can't open dialogs on client-side. If you need to get/send some information from the server, simply use webservices to send/fetch the information using ajax.

Using XMLHttpRequest to display a popup

I am writing an ASP.NET 3.5 web app that displays a list of items. I want to be able to display a non-modal popup with details when the user selects an item. I want to be able to display several detail popups simultaneously. (i.e., the user can click an item to see its details, then click another item to get another popup.) Currently I call RegisterStartupScript during postback to write a "window.open(...)" script to the page when it re-renders. The problem, of course, is that this requires a full page postback and refresh.
It occured to me that this might be a perfect use for XMLHttpRequest or AJAX but I don't know how to do it (or whether it's even possible or smart to do this). Can someone show me the way?
I have the AJAX Extensions installed but I'd prefer not to use the AJAX Control Toolkit.
EDIT:
Some clarification: When the user selects an item a custom event is raised. On the server I handle this event and use some server-side logic to construct a URL which I then use with RegisterStartupScript to construct a "window.open(myUrl...)" script. But posting back the whole page to do this seems inefficient and I'd like to know if I can just make a call to a simple server-side function that constructs the url and sends it back without having to roundtrip the entire page.
Creating a popup has very little to do with AJAX, and a lot more to do with JavaScript. See the jQuery dialog library here. You can then use jQuery's AJAX API to do your server dirty work :)
jQuery Dialog UI
--
Bill Konrad
Devtacular - Web Development Tutorials
You can use DHTML Window widget.
It offers many way to display either modal or non modal window.
Also it supports AJAX.
You can use dhtmlwindow for open a new window, or
dhtmlmodal to open a new modal window.
Of course, you can edit it to match your requirement.
Sample:
var insWindow = dhtmlmodal.open("insbox", "iframe","UserMaster.aspx?" + queryStr, "User Master", "width=425px,height=500,center=1,resize=0,scrolling=1", "recal");
Do you really need to open a new window? Opening an absolutely positioned DIV or a new layer on top of the current page in the same window is all the rage these days.
Edit:
I don't think it would limit the number of popups, there is some neat stuff that can be done these days with libraries like jQuery + jQuery UI, you can simply create as many of these DIVs/layers as you need and make them movable, resizable, etc. Only thing that real popups have and these do not is that they do not appear on the tab panel/taskbar.
Yes, you will be limited to the size of the window in which is the main page opened, however, I don't personally see it as a problem since most people surf in a maximized browser window anyways.
Implementation of the oldschool typical popup window is undoubtedly much easier for you, but it also runs into problems with end user popup blockers. Just had that problem # my work, they needed to make a popup during the certificate authentication process for some reason and as soon as Yahoo released a new version their toolbar, it quit working).

Resources