Replies: 1 comment
-
Add this for your Page:
now go into your WindowLayoutPage.xaml.cs file and set DataContext:
and connect to your ViewModel like this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a WinUI3 app that looks like this:
I'd like to have the "Apply"/"Edit" buttons on each list item. But I'm having trouble getting this to work in code. Ideally, I'd use
Command={x:Bind ViewModel.ApplyWindowBlueprintCommand}
on each Apply button. But this doesn't work since the parent ListView's ViewModel isn't passed to its children.I've also tried naming the Page and using
ElementName
to access its ViewModel but while this compiles, it doesn't actually call the command when run.This is my ViewModel:
And my XAML:
Beta Was this translation helpful? Give feedback.
All reactions