WindowsPhone equivalent of "UITabController with UINaviagtionController per each Tab" in iOS - c#

I have iOS application with UITabBarController that contains UINaviagtionController for each Tab, like on the picture below.
I also want to port my application to WindowsPhone (>=7.5).
My question is: Which UI components/services can I use to create the navigation flow like in my iOS app?
Update
About UITabController you can think like about tabs in windows
The hierarchy of controllers that painted on the picture above mean that each tab in UITabController will have own UINavigationController (in the WP terms this is NavigationService). So if you will use the navigation on one tab this will not affect to navigation on other tabs.
But as far as I know by default WP application have only one instance of NavigationService.
So actually my question is relevant to a question: Can WP application use more than one NavigationService?

Windows Phone uses slightly different UI concepts. Instead of using Tab control you should use either Panorama or Pivot control. The former is used whenever you want to display completely disparate elements on a single large page, the latter is for displaying multiple views of the same data. This means that Panorama is used for displaying multiple views of different data.
Whenever you navigate from one page to another using NavigationService, it will keep the current stack. It serves as a history for the hardware Back button (unlike software button in iOS).
This means that you hold only one sequence of previously open pages in your application that can be navigated backwards, there cannot be any "side" stacks since they make no sense.
So if you were to navigate from one pivot item to some other application page, you would use the one and only NavigationService. Therefore each pivot/panorama item uses the same stack as the rest of the application.
If some things are still unclear, feel free to ask here.

Related

Combine two pages into one in Windows 10 UWP?

I have developed a Windows 10 app and I have List View with ListViewItems, when user clicks on the item, I am navigating it to new page in which details are shown for that ListViewItems. Now, my app needs to be used for desktop app also, so how can I combine these two views into one similar as Split View (left side item List and right side its data). Example Skype Preview app, in that when device is in landscape mode, then it shows, left side contacts list and right side chat details. I want to achieve same in my app. Is there any easy way to achieve this requirement or I need to create new UI for this?
You can refer to the official Master/detail sample. When on PC, it uses ContentPresenter and bind its content to the selected item of ListView. And when on Mobile, it uses navigation to navigate to the detail page and together pass the selected item as parameter to the detail page.
Is there any easy way to achieve this requirement or I need to create new UI for this?
I think it is needed to modify your layout, and you can use VisualStateManager to make your layout adjust to the window's size.

Multi-page/user control Silverlight application

I'm starting a project which will contain multiple pages tabs style. I.e. you have a footer of the application and it's header. Header contains buttons that load different User Controls in the center of the app. I know how to swap user controls and show one or another, but, what concerns me are events from hidden controls and UI updates.
I was thinking about creating UserControls to represent each page. One would contain list of files available for download, another would contain UI of the download manager that would show end user progress of download.
In order for some page/control, that is not currently showing, to throw events, its instance need to be present. What would happen with UI updates in this case? Consider user selected files to download and added them to the download manager. Download manager is currently in the "background", basically, it's UI doesn't exist (instance of the UserControl exists though). I presume that every attempt to update the UI will end up with an error?
Or, am I over-thinking this? Now, that's all a theory at the moment, I didn't yet code a single line of code for this project because I wanted to consult with someone and start from the right foot.
Thank you in advance.
P.S. Or may be use tab control...
If I understand you correctly, you are not loading/unloading the usercontrols, but merely showing/hiding the usercontrols. Updating the UI should not cause an error in this case. What you need to the design and implement is a number of events that the container will subscribe to. The container should then trigger funtion calls to the correct usercontrol that needs to be updated. But, as you state I would prefer to use a tab control. But, the event part is still the same.

Wpf application -- How to save and load which screen the application is on

I've looked over Stack overflow and seen some posts that almost solve this problem but not really. To be specific I'm referring to an application that is deployed to users who might have 3 or 4 displays and the application would want to remember which one to go to on startup.
I have a WPF application and I want to save what screen it was on when the form does it's OnClose. Then when it loads I want to put my application on that screen.
How can this be done (without hacky Win32 API calls)?
EDIT: In a previous StackO post someone mentioned doing something like:
var screen = System.Windows.Forms.Screen.FromRectangle(
new System.Drawing.Rectangle(
(int)myWindow.Left, (int)myWindow.Top,
(int)myWindow.Width, (int)myWindow.Height));
Once I have screen it seems that the only thing I can do is check whether the application is either on the primary screen or not. Which is fine...if my users only have two screens, but not good if they have 3+. Is there something better I can do with this resulting screen object than just check if it's primary.
You can get more infomation on multiple monitors from Screen.AllScreens property
http://msdn.microsoft.com/en-us/library/system.windows.forms.screen.allscreens.aspx
Also from memory, I think if you just save your Window Left and Top position and restore them when you load your app, this works with multiple monitors.
I did this previously with a ViewManager class, a custom XML config file and MVVM. Essentially, when OnClose is called, the ViewManager class (A custom class that really just held a collection of also custom ViewInfo instances) is polled to find out which views are currently open and in which order (as they could be tabbed through using Ctrl+Tab) and what the ID of the record was that was being displayed; this app was using Entity Framework to access database data, each application view mapped to either a collection of records or a single record of a specific type.
Anyhow the XML output would contain the name of the View, the Application (there were several portions to the app which I referred to as applications internally) to which it belonged, information about the record that was loaded, etc.
Upon loading the program, the only View that is automatically loaded is the HomeView which potentially contains all other views. ViewManager checks the XML file and loads views based on it's content. This action could be turned off in the options screen so that users where presented with a clean workspace upon entering if they like.

WPF Navigation - Random Access - Go to directed page not just forward or back

I am using WPF Page navigation in a c# windows based application. There are a series of pages that I am creating like this
Page TargetPage = new myPage01();
TargetFrame.Navigate(TargetPage);
The first-time page creation and navigation are working fine, and because I am passing by object the pages are kept alive for me to reference at a later point.
When the user hits the last page (all different views of the same data) and clicks the next button I want the UI to "loop" around to the first page. I am trying to figure out how I can redirect the frame to that first page. I do not want to rely on the built-in journal history within the GUI itself. How can I reference the first page previously created or for that matter any of the previously created pages by referring to it in the code. All the page navigation examples I have come accross are always creating the page as new or using the back or next to navigate to other pages.
Thanks
I do not want to rely on the built-in journal history within the GUI itself.
If you do not want to do that you need to keep track of everything yourself, which i would not recommend unless there is something wrong with the build-in functionality. You can probably find the first page to be the last item of the BackStack.

Windows Forms Browser Skeleton (C#/.NET)

I was wondering if anyone knows of an existing sample or an approach to achieve the desired functionality.
Basically, what I'm looking for is a web browser like skeleton. The idea is that the main screen of my application is shown in the left tab. This tab can never be closed. On this screen is an overview of various application components such as activities, events, contacts, etc.
When the user clicks on a specific contact/event/activity a new tab is created and auto-focused. The user can view and edit the information. When they are done they can close the tab.
The ability to have multiple tabs open is important.
Also, keyboard shortcuts to easily navigate between tabs would be great, but not absolutely essential at this point.
Note: I don't need to access any web content.
Really what I'm looking for, at least what I think I'm looking for, is a shell of a modern web browser. Does something like this exist? Is there a good approach to building such an application?
Note: I'm new to Windows GUI development, so I apologize if this is a rudimentary question. I was unable to find anything meaningful while searching MSDN and other resources.
Thanks!
What it sounds like is not really a Web Browser shell at all, simply the relative appearance of one functionality-wise.
What you can do is use a TabControl control. This can be altered to suit your needs quite perfectly in my view.
An example of a modified TabControl is as follows: [ From here ]
There are a number of things that can be done with a TabControl (as with any other component) to make it suit what you need.
Here are some links that you may find helpful:
Flat Tab Control - As per the picture
MSDN
Video on using a Tab Control
C# Corner

Categories

Resources