Windows 8 Store App Certification - Snapped View - c#

In the Windows 8 Store App certification requirements it states that your app must support a snapped view. Does anyone know if it's possible to create a single snapped view that persists across the app? For instance on my main view I have 4 buttons that take you to different parts of the app, the buttons do not exist on the other views. What the design team is requesting that I do is create a snap view with the four buttons and some default text describing the app, they want this to be the snapped view for each page.
Is that possible?
Will Windows accept it?

Yes it is possible
Yes it will. I've seen several apps doing this including at least one of the first party apps. Store itself shows static image for snap view.

Related

Getting Master Detail to behave on UWP just like it does on Android and IOS

I have a prism Xamarin Forms application which is being designed for both UWP, Android on IOS. This is the first UWP app that I have created. I want to have a menu that is only accessible from the first level of navigation. To do this, in the past, I have used a Master-Detail page. However, I have encountered some behaviour differences that I need some help with.
When I use a Master-Detail screen on IOS or Android it behaves like a menu only accessible to the first level of navigation. Any subpage that you might navigate from there you don't see menu it is replaced by the back button.
When I use a Master-Detail screen on UWP it's behaviour is different. The menu is available on all pages no matter how far into the navigation stack you travel. It is by default also a menu tray of items anchored on the left side of your application.
I have figured out how to make the menu collapse into the hamburger button that I am used to on an Android and IOS application by setting the parameter MasterBehavior to the value Popover. But I would like to have the menu completely disappear on any page navigated past the first level as it does on IOS of Android.
Does anyone know of a way to make this happen?
I think I can say safely that this can't be done in pure Xamarin.Forms.
To change this you would have to change to which UWP Frame the content is loaded, and I am not aware that Frame is exposed anywhere in Xamarin.Forms which means that even custom renderers cannot help.
However you may try to build the native navigation that would act like that in the UWP project and then load inside those native controls Xamarin.Forms page, that should work and deliver the results that you have requested. Not trivial and no few lines that I can show you, but if that is important for you it should be possible this way.

How to achieve Windows Phone 8 News App layout

I am wondering how does the News app on Windows Phone achieve its layout. I am taking about the main page when the app is first launched. It is not a pivot because you can see the next section on the current section. It is not a panorama because the background is not moving, and that it is a universal app so Panorama is not available. It is not a Hub because Hub does not allow you to wrap from the first to last, or vice versa.
I notice this layout is very similar, almost identical to the layout of the Fitbit app. I like this kind of layout a lot and I would like to use that on my own app. If there is a control for it please let me know, if not, how do I do what the developer have done on those apps.
The app is using the Panorama/Hub control. It does not set the title of the control and it does not have an image for it. The first Page/Section does have an image for the main article. this image is only set for that Page/Section. The first section also does not have a Header set (it's blank).
Hope that helps!

MVVM shared between Win8 and WP8 (2 pages in one page)

We have a Windows Phone 8 application that uses MVVM. There are a couple of pages that work in the following way. Page 1 has some buttons and when one of them is clicked, page 2 is opened.
Now we want to migrate our application to Windows 8. Because of the bigger screen size, we can actually display both the buttons and the content on the same page (see the attached picture). Basically we are going to have a single screen on which we dynamically change a part of it (the right side with green)
We would like to share the view models between the two application. Is there a pattern to use for something like this?
There are a few alternatives that we investigated but we are not sure which one is correct:
Should "some content" (the second page in WP8) be a user control in the windows app?
Should we create a completely new view model for the Win8 that has the code from multiple view models in the WP8 app? This sounds like a bad idea though because we have about 6 view models in the WP 8 app that are now displayed on the same page in the win app.
Should the Win 8 view models somehow "contain" the other view models?
Should the dynamic content (the green box) have its own MVVM?
Ideas? Suggestions?
Well, this depends too much on your application to give any definite answer. But since pressing the buttons will load different content in the W8 app, MVVM can solve this without too much problems.
So, in WP8 app pressing the buttons issues a message that triggers navigation. In W8 you can change that message handler to destroy user control and create new one. In WP8 app your second screen was a standalone page with its own view model, there is no reason to not have a user control on W8 using that same view model.
However, you have to write UI from scrath since XAML cannot be shared.

Sharing the same viewmodel between pages/main page and sub-page

I'm kinda new to the whole windows platform and I'm trying to create mvvm portable class library for windows and windows phone. Now that I have all my smaller pieces ready, I've found myself stuck at trying to figure out how to achieve the following with mvvm.
I have a main page where I can see the information for a car rental reservation and in this page. I'll be able to see a pickup location and a dropoff location (which are both inside a PointOfInterestViewModel). When I click on either the pickup/dropoff location. I want to switch to anther page which has a pivot with multiple list of possible locations. Once the user selects a location, I'll want to update the location in the PointOfInterestViewModel and then send the user back to the main view.
Is there a way where I can achieve it without having multiple PointOfInterestViewModel(s) and passing data between them? I would much rather have one single viewmodel but still adhere to mvvm.
You could put the PointOfInterestViewModel on the App class, bind the main form to it - then you could update it from the pivot:
((App)App.Current).PointOfInterestVM = ....

WPF Group Windows

I have a WPF application that loads a realtime live chart in a window,
But I end up having 10+ windows open on my desktop (as many windows as there are charts).
So my need is basically to group/embed all these WPF windows in a single window.
I tried WPF MDI but I had serious trouble since it requires the windows to be usercontrols instead, and in that case, my live chart displays but stays empty and does not refresh nor plots realtime data. Same behavior when I put my chart controls inside a Page instead of a Window (chart does not update). This is why I guess I really need to stick with windows at this point.
I welcome any simple & straight solution
Are you sure you want to have a last century MDI in your WPF application? I'd recommend to switch to other, less expensive and more flexible content arrangement. I'd organize the charts in some kind of scrollable or swipeable container, maybe with some kind of navigation or tabbing facility... If your users really want to have one or some charts in a separate window(s), let them drag the charts out of the main container and create separate window on demand (something like dragging a tab out of Interent Explorer).

Categories