Skip to content

Button is always disabled when i add a Command to it #6856

Answered by Avngarde
Avngarde asked this question in Q&A
Discussion options

You must be logged in to vote

Nevermind, i fixed it.

I was making new Window appear like this:

            Window addNewWindow = new AddNewWindow();
            addNewWindow.Show();

But then i added DataContext to it

            Window addNewWindow = new AddNewWindow();
            addNewWindow.DataContext = new AddNewWindowViewModel();
            addNewWindow.Show();

And everything worked nice.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by maxkatz6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants