CommunityToolkit / CommunityToolkit/dotnet

The RequestMessage in Constructor

Open
#604 0 comments 0 reactions 0 assignees View on GitHub
bug :bug:
Dominant language
C#
Stars
3.8k
Forks
400
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug

If the RequestMessage is used in the constructor, the xaml design view will not be displayed correctly.
![image](https://user-images.githubusercontent.com/48956359/218313834-98294ea1-59dc-43dd-b5d7-c62900f5b74e.png)

### Regression

_No response_

### Steps to reproduce

```text
class ViewModel : ObservableRecipient
{
public ViewModel()
{
var str = WeakReferenceMessenger.Default.Send>();
}
}
```

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.