We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Creating a dynamic buttons in code behind makes the button disabled when the RelayCommand is used. Here is a example
var removeButton = new Button() { Content = "X", Command = new RelayCommand<int>(RemoveEntry), CommandParameter = index, };
then afterwards adding this button to a StackPanel the property isEnabled is always false (no matter how it's bound).
There is a workaround solution make it work First object initialize the button with IsEnabled =true, without setting the command
var removeButton = new Button() { Content = "X", IsEnabled = true, CommandParameter = index, };
afterwards just set the command
removeButton.Command = new RelayCommand<int>(RemoveEntry);
The text was updated successfully, but these errors were encountered:
Hi! I have the same issue
I think you should ask question here https://github.com/CommunityToolkit/dotnet
Sorry, something went wrong.
No branches or pull requests
Creating a dynamic buttons in code behind makes the button disabled when the RelayCommand is used.
Here is a example
then afterwards adding this button to a StackPanel the property isEnabled is always false (no matter how it's bound).
There is a workaround solution make it work
First object initialize the button with IsEnabled =true, without setting the command
afterwards just set the command
The text was updated successfully, but these errors were encountered: