-
Jan 4th, 2022, 01:32 AM
#1
Thread Starter
Addicted Member
Set control focus on viewmodel change
Sorry I am rather new to WPF and MVVM, I have always stuck to WinForms but I am trying to make the switch. This might be something simple that I am overlooking.
In my app I have the current viewmodel bound to a contentcontrol. I am trying to set the which control, in the view, has focus when the contentcontrol changes and perhaps remember which control had focus when switching back. My thought is this has to be done when calling the OnPropertyChanged() when changing the current viewmodel, but I am not sure how to do this while sticking to MVVM practices.
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
|