dotnet icon indicating copy to clipboard operation
dotnet copied to clipboard

The RequestMessage in Constructor

Open Hakoyu opened this issue 3 years ago • 0 comments

Describe the bug

If the RequestMessage is used in the constructor, the xaml design view will not be displayed correctly. image

Regression

No response

Steps to reproduce

class ViewModel : ObservableRecipient
{
    public ViewModel()
    {
        var str = WeakReferenceMessenger.Default.Send<RequestMessage<string>>();
    }
}

Expected behavior

The design view is displayed normally

Screenshots

No response

IDE and version

VS 2022

IDE version

17.4.4

Nuget packages

  • [ ] CommunityToolkit.Common
  • [ ] CommunityToolkit.Diagnostics
  • [ ] CommunityToolkit.HighPerformance
  • [X] CommunityToolkit.Mvvm (aka MVVM Toolkit)

Nuget package version(s)

8.1.0

Additional context

No response

Help us help you

Yes, I'd like to be assigned to work on this item

Hakoyu avatar Feb 12 '23 13:02 Hakoyu