Skip to content

Does RaiseCanExecuteChanged need to be called on the UI thread? #77

@CodingOctocat

Description

@CodingOctocat

I found this question at StackOverflow, should the RaiseCanExecuteChanged method be executed on the UI thread instead?

Why people use CommandManager.InvalidateRequerySuggested() on ICommands? - StackOverflow

public void RaiseCanExecuteChanged()
{
    Application.Current.Dispatcher.Invoke(() => CanExecuteChanged?.Invoke(this, null)); 
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions