© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
13 replies
Elio

Command WPF with viewmodel

Hello, i'm looking for some help : I'm currently developing an app with wpf using the mvvm model and i'm struggling with the command of my button, i do not understand why they aren't triggered when i click on it, the break point is not hit but the viewmodel assign to my view seem to be correctly loaded. I've already tested the command which isn't the problem but it seem to come from the page cause the command trigger work on the other page but not on this one.
the second image show the click event i've setup just to test if there is a datacontext and if command work well and it seem to work cause the command is correctly triggered when i used the click event but not when i use the button with the command in the first image.
do you have any idea what can be the cause of this problem ? (i suppose it's something related to my navigation service or my host declaration with the Singleton etc. but not sure)
Or how am i supposed to debug this ?
image.png
image.png
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ WPF - Use command of viewmodel instead of item on click
C#CC# / help
3y ago
❔ WPF command
C#CC# / help
4y ago
Access dependency property from a viewmodel WPF
C#CC# / help
2y ago
ViewModel with BaseViewModel
C#CC# / help
2mo ago