Closed micah686 closed 3 years ago
Those properties you posted, are they from RootViewModel
? WPF doesn't think that RootViewModel
has a property called LastPlayedPage
(that trailing space might or might not be significant, I'm not sure). This is a WPF issue anyway, not a Stylet one.
Is there also a way to have the methods used in the s:Action _____ show up in the view model as being used?
I don't know of any. Let me know if you find one!
No, it's from a custom UserControl that I've made, not the RootViewModel.
The DataContext at that point is RootViewModel though, as you can see from the binding error. From the small snippet you posted it's not clear why you think the DataContext should be anything else.
Can you post a complete minimal reproducible sample, so I can see what you're actually trying to do? At the moment there simply isn't enough information to give any help.
Nevermind, I'm blind. I was using the RootViewModel as the datacontext, instead of the associated VM class.
I'm having trouble setting up certain types of XAML Binding, so that I can right click on the property/Command, and go to the relevant section on the ViewModel. For example:
With the code above, I get a :
Is there also a way to have the methods used in the s:Action _____ show up in the view model as being used? So something like Command="{s:Action SubmitAsync} would have the SubmitAsync command in the ViewModel shown as being referenced? Or does that go against the design principles of Stylet?