Skip to content

Change property in async method in WinUI3 project will throw COMException #994

Discussion options

You must be logged in to vote

You can bypass this by moving that to your ViewModel, create a Task and mark it as RelayCommand:

[RelayCommand]
async Task MyAsyncTask(){
     -- Your code
    IsProgressRingVisible = false;
}

private async void NavigationParameterService_ParameterChange(object? sender, BlueprintInfoViewData e){
    ViewModel.MyAsyncTaskCommand.Execute(null) //Params if needed)
}

Replies: 1 comment 1 reply

Comment options

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

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