I have a ViewModel
that accepts several constructor parameters. As I understand because of this the only way to set View's DataContext is using code behind.
This has its downsides:
- Visual Studio will not show
ViewModel
inteliscence for the view that is being constructed - There is no way to see design time data that is defined in my
ViewModel
constructor in XAML designer because designer simply breaks
What are my options?
I would like to have a ViewModel
that can accept constructor parameters, have design time data and that my Visual Studio inteliscence provide me suggestions about members in my ViewModel
so I could have a good design experience.
PS. I'm using MVVM Toolkit / Windows Community Toolkit from Microsoft, but I would appreciate any answer on how to achieve my end goal. Thank you.