-
August 29th, 2020, 03:14 PM
#1
How do you manage windows?
Like you have 2 buttons. Lets call them
Menu, Tables
When you press Menu , you want to display the menu
but the other buttons not to show.
When you press Tables, you want to display Tables.
but the other buttons not to show
This can become messy if i live it on one window so we can use UserControl to do this? and what would be the most appropritate way to do this?
Code:
void Menu(){
//Show Menu
//Close Reports
//Close Tables
//Close Beaches
}
void Reports(){
//Show Reports
//Close Menu
//Close Table
//Close Beaches
}
But imagine having more items and you would have to go over each one and each one to turn them off... it will become a mess.
-
August 29th, 2020, 03:49 PM
#2
Re: How do you manage windows?
You can use a tab control with its styling set to hide the tabs. Each 'tab' contains the view you wish to display.
Your menu simply sets the active tab.
Search bing or google for "wpf tab control hide tab".
[Edit] there might be a newer way to do this now, but back then using the tab control with hidden tabs was the way to go.
Last edited by Arjay; August 29th, 2020 at 11:10 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|