ā Problem with Data Binding
Okay so I'm using Items Control to populate a bunch of Expanders, the expander header is supposed to have two buttons and I'm trying to bind the Commands but it's not working, what's weird is that I've set the Data Context properly and other things like AppIcon, AppName and everything else gets binded properly except for the button Commands and Parameters, can you help me?
View.xaml.cs
ViewModel.cs
XAML: https://paste.mod.gg/llsvpcqqfqjj/0
12 Replies
ignore the first two because I haven't implemented those but why is it looking in the view not the viewmodel š„¹
Unknown Userā¢6mo ago
Message Not Public
Sign In & Join Server To View
Even if I bind it normally like Command={Binding OpenAppLocation}
it doesn't work
I tried ElementName as well
Unknown Userā¢6mo ago
Message Not Public
Sign In & Join Server To View
Yes idk why
Unknown Userā¢6mo ago
Message Not Public
Sign In & Join Server To View
It's driving me crazy cuz it's the only View which has binding errors
Unknown Userā¢6mo ago
Message Not Public
Sign In & Join Server To View
Alr
RelativeSource
binds to a control, not a VM.
Command="{Binding DataContext.OpenRegLocation, RelativeSource=...
is what you should be tryingStill the same
ok nvm
it works just fine now
thank you so much
ā¤ļø
!close
Closed!