Reputation: 1790
I have an application with some windows. In every window is a grid with data from database, filters, actions etc.
The problem is, that I navigate those windows using top menu and every time, I switch to another view, current window is closed and the new one is being opened. It's dummy and windows are jumping on the screen.
I'd rather have my application in one window and just show appropriate content. But if I have all the DataSources and other stuff in one window, it would be ineffective.
Can you give me a clue, how to manage an app like this? I like Roxio Creator sw. for example. There are some tabs on the left side and content animates as is every tab activated...
Any advice would be appreciated.
Thanks, JiKra
Upvotes: 2
Views: 2642
Reputation:
You could use the Framing concept of WPF in this you need to define an frame element and create pages to be show into this frame element. If you wish to do so just replace you window1 inheritance from window to page and change the correspondence changes into XAML, and in your main page create frame control which host these pages by using navigation source.
http://www.paulstovell.com/wpf-navigation
The other way is to create a tile view in advance mode so if you have limited windows then just resize them as per requirement. This link could be helpful to you:
Upvotes: 2
Reputation: 480
if you don't need all the windows open at one time, you could create pages and use a Frame control to show them one at a time. This way each page would have it's own DataSource and code-behind. To provide filtering, sorting, etc, you could use interfaces, then you could access the window DataContext and execute commands in it. If you need them all open at once, you could create UserControls instead of windows and show them at TabItems inside a TabControl.
Hope it helps, Diego Modolo Ribeiro
Upvotes: 2