C# wpf navigation pages behaviour issue - c#

Recently picked up WPF about a month ago , decided to design a small WPF navigation application. my design requires a _mainwindow with multiple tile buttons , and click event show a new page, page 1 or 2 which have different content and a back button that takes screen back to the _mainwindow . I have total 5 pages in the application . The problem i am facing is , if i uses NavigationService i have to use pages only and its giving a default navigation bar that i do not require , secondly my design requires pages to be isolated rather to navigate 1 page to an other with navigation bar .
So my question is how can i be able to implement this design with my limited knowledge of WPF or should i have to change the design .

Do you mean the arrows. You can hide them
<Page x:Class="Gabe2a.PageDocFieldDetail"
ShowsNavigationUI="False"/>

Related

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.

How to create WPF application with multiple XAML files?

I am developing a simple WPF application and I can create a single MainWindow with controls, content, etc.
However, I want to split my app. And I have a problem to build an app with welcome screen where user can choose between two modes, as seen below:
After click on Learn button I want to load this XAML:
And after click on Next (from Learn screen) or Recognize (from Welcome screen) I want to load this XAML:
...everthing in the same MainWindow.
I can't even name what I am trying to achieve. Do I want pages? Or views?
How to handle this situation in WPF ?
This you can do it in many ways. Basic thing is place each functionality in different user control, so that you can chose to load them at the run time
Have different user controls and hide all except the first one, depending on the users selections you show the on you want or
Use Content Presenter, depending the user selection load the controls at run time in to the content presenter.

Windows 8 Store App Certification - Snapped View

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.

radiobuttons on windows phone applicationbar?

Hey guys I have this page :
PS: this is temp data, so it don't look so good ;P
Now if I click on that filter button, I want a popup window or radio buttons to show in the application bar, is that even possible? Or should I try another way of doing this?
As you choose a radio button I am going to have the page filter on the choice made, so I can't leave the page to go make a choice. Any help/link/tutorial will be appreciated :)
Thanks in advance,
Working on windows phone 8/ silverlight / c# ...
You can't have a radio button in the app bar.
I would implement this as a separate page and update your filter when you navigate back to this page. The page instance and view model will be still in memory so it should be a matter of detecting the back navigation in OnNavigatedTo and applying your filter at that point. Sharing a ViewModel between this page and your filter page would be the best way of communicating the filter value, but that's not the only way.

Building a custom control in C# (Metro App) that has a page flip effect

I want to create a custom control for Metro Applications written in C# (from my recent research I guess what I am trying to implement is an ItemsControl) that can hold a number of pages, each page can contain any combination of XAML controls, very similar to the FlipView control.
In my custom control I want to show two pages at a time in a book format and with page flip animations that are dynamically bound to the position of the user's drag, exactly like this example: http://turnjs.com/
I have no idea on where to look for references since the only page about creating custom controls is still under development: http://msdn.microsoft.com/en-us/library/windows/apps/hh465455.aspx
Can someone point me at the right direction?
I wish to know how to create a custom control that manages pages with arbitrary content.

Categories