Re: Keyboard Navigation - how to make a tree of focusable input?
What if I would have 10 menus (whole menu with submenus), can I have 1 ViewModel for them or ViewModel per menu?
- KeldorKatarn
- Posts: 193
- Joined:
Re: Keyboard Navigation - how to make a tree of focusable input?
You want to databind a ContentControl to the a property on the ViewModel. That property will change to whatever should be displayed. Then you define the UserControls as DataTemplates for these types.
https://stackoverflow.com/questions/573 ... pplication
https://stackoverflow.com/questions/573 ... pplication
Re: Keyboard Navigation - how to make a tree of focusable input?
Yee I understand so for my exampleYou want to databind a ContentControl to the a property on the ViewModel. That property will change to whatever should be displayed. Then you define the UserControls as DataTemplates for these types.
https://stackoverflow.com/questions/573 ... pplication
-1MainTab
*1SubTab <- generate content in ControlContent
-2MainTab
*1SubTab <- generate content in ControlContent
*2SubTab <- generate content in ControlContent
I will have here 3 view models"
1) for main view model (1MainTab and 2MainTab)
2) for 1MainTab's SubTab's, maybe i will here here more subtabs
3) for 2MainTab's SubTab's
How u think it to make it reusable for another menus?
- KeldorKatarn
- Posts: 193
- Joined:
Re: Keyboard Navigation - how to make a tree of focusable input?
It's really hard to describe all the basics here in a short post. I think you need to read up on how the MVVM pattern works. You're trying to implement an advanced navigation without understanding the basics of the architecture yet. I don't think this is the best place for that. Maybe try it in a normal WPF application first?
Here's a tutorial on how to achive navigation like this:
Here's a tutorial on how to achive navigation like this:
Who is online
Users browsing this forum: No registered users and 79 guests