11
  • I would like to know the difference between page, frame, navigation windows in c# wpf
  • what is the best choice of them for wpf windows application?
  • in my application how to make fixed part (contain main buttons) and changeable part (show pages) after clicking buttons in fixed part
  • are there any good websites provides video tutorials for c# wpf from beginning to professional?

thank you

George
  • 8,368
  • 12
  • 65
  • 106
Hatem
  • 245
  • 2
  • 4
  • 16

2 Answers2

10

A Page is much like a user control, only that is is displayed within a Frame, which again is part of a NavigationWindow. A NavigationWindow is a special kind of window that allows for page navigation and can display the respective controls for navigating pages.

A paged application is a good choice if you want Wizard-like functionality, or if the user experience should be comparable to what you get when browsing the web. In many cases, using standard WPF windows is a better choice.

The NavigationWindow already contains a "fixed part" that can contain controls. You can also use a normal window, place a Frame in it and then - through proper layout - create your own "fixed parts". Navigation would then come down to calling the navigation methods the Frame provides.

Thorsten Dittmar
  • 55,956
  • 8
  • 91
  • 139
  • @ Thorsten Dittmar but i think in Navigation Window ..u can't change button styles in fixed part ,so whatever changes u make..it will keep the same shape of a web page ... so i think making a fixed part in the main window of my windows application and using frames to be the changeable part will be a good choice ...right??? – Hatem Dec 19 '12 at 13:12
  • 1
    I think I've read about how to theme the default navigation controls. Of course, if you want to have full control over the layout, using a `Frame` within a normal window is most flexible. All that is only true of course *if* using navigation is a good choice for the type of application you're creating. A navigatable user interface is not suitable for every type of application. – Thorsten Dittmar Dec 19 '12 at 13:57
  • @ Thorsten Dittmar ... i dont want to make an application with navigation controls except in very small parts in my application ...but my application as a general idea will be a regular windows application with buttons to show certain parts and edit information – Hatem Dec 19 '12 at 14:14
  • @ Thorsten Dittmar but how to bind many frames to the same main window?? should frames be designed in separated solutions and keep the main window in a separate one ...then link every fram to its own button in the fixed part?? or what?? – Hatem Dec 19 '12 at 14:21
  • You don't "design frames". You add one `Frame` control to a window and create many `Page`s. Every page is (like a window) a combination of a WPF document and a class. It doesn't matter whether you store it in different solutions or not. Personally, I'd keep them in the same solution. – Thorsten Dittmar Dec 19 '12 at 14:26
  • @ Thorsten Dittmar thank you so much for your time and effort – Hatem Dec 19 '12 at 14:29
  • whats the difference between Frame and NavigationWindow? – Konrad Jul 05 '19 at 16:35
  • The best answer is here: https://www.syncfusion.com/faq/910/what-is-the-difference-between-frame-and-navigationwindow – Konrad Jul 05 '19 at 16:38
  • **by default NavigationWindow contains Back / Forward buttons whereas Frame doesn’t.** – Konrad Jul 05 '19 at 16:39
  • also https://books.google.com/books?id=ubgRAAAAQBAJ&pg=PA194&lpg=PA194&dq=navigationwindow+VS+FRAME&source=bl&ots=KHDDvjqppZ&sig=ACfU3U0K6n4kfkhulpuOIXGwJEtSKtx2DQ&hl=en&sa=X&ved=2ahUKEwiH6aa8m57jAhWMZFAKHbgeARYQ6AEwB3oECAYQAQ#v=onepage&q=navigationwindow%20VS%20FRAME%20What's%20the%20difference%20between%20NavigationWindow%20and%20Frame%3F&f=false – Konrad Jul 05 '19 at 16:42
0

From the answer to this question:

Pages are intended for use in navigation applications (usually with back and forward buttons, e.g. Internet Explorer). Pages must be hosted in a NavigationWindow or a Frame

The best choice depends on what kind of application you want to create. Is it a wizard or navigation type application or just a regular application with one window (maybe with tabs)?

I would definitely consider using a MVVM framework like Caliburn.Micro for making a WPF application. It has some really powerful mechanisms for dealing with Screens, Conductors and Composition, in addition to encouraging you to decouple your application by using the MVVM pattern. The author of Caliburn.Micro, Rob Eisenberg, has written some tutorials with extensive explanation about and how to use the framework under the project's documentation. There is also lots of resources around the interwebz, google it! :)

I can also recommend Pluralsight's WPF and XAML Fundamentals and WPF Advanced Topics, they should cover what whatever is worth knowing about WPF :)

Community
  • 1
  • 1
khellang
  • 17,550
  • 6
  • 64
  • 84