Skip to content
Discussion options

You must be logged in to vote

It actually works fine and getting invoked during debugging.
Or do you mean why the TextContent is not updated with indexViewModel.TextContent = "asdasdadasd"; from your Generate class?
Because you initialize new instances of IndexViewModel inside the Generate class instead of reusing the existing VM. I would also add, that your ICommand implantation is wrong and I would recommend you to use the RelayCommand from the CommunityToolkit.Mvvm that you have installed.
Here is a full working code.

Code under this spoiler,
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows;
using System.Windows.Input;
using CommunityToolkit.Mvvm.Input;

namespace WPF_Passwo…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Evanna456
Comment options

Answer selected by Evanna456
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