Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Messenger keeps stacking messages even it is unregistered

Aperta
#1,103 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
desktop

Direzione di ricerca

Inizia con la riproduzione collegata di WpfTestStrongReferenceMessengerStackingIssue e segui il flusso di registrazione e deregistrazione di StrongReferenceMessenger quando la finestra viene aperta due volte. Riproduci il comportamento mostrato nel video; il lavoro è completato quando il logger riceve un solo messaggio su una riga per la seconda finestra.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug :bug:
Describe the bug

I have come through this bug and did not find a solution for it, even AI was unable to answer me. So, I think it is a bug in the library.
I have created a sample repo as well as a video showing the behaviour.
The issue in short, is that when you register StrongReferenceMessenger and then unregister it, when you open it again previous messengers registrations will be invoked and stacking messages are in place.

Here is the repo to reproduce

https://github.com/JawadJaber/WpfTestStrongReferenceMessengerStackingIssue

Regression

No response

Steps to reproduce

https://github.com/user-attachments/assets/d0d69615-8445-46c2-a935-b4985683655a

Expected behavior

When creating new window twice, the logger should receive only one line message not two.

Screenshots

No response

IDE and version

VS 2022

IDE version

No response

Nuget packages
  • CommunityToolkit.Common
  • CommunityToolkit.Diagnostics
  • CommunityToolkit.HighPerformance
  • CommunityToolkit.Mvvm (aka MVVM Toolkit)
Nuget package version(s)

8.4.0

Additional context

No response

Help us help you

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

Lingua principale
C#
Stelle
3.8k
Fork
401
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di CommunityToolkit/dotnet

Tutte le issue di CommunityToolkit/dotnet

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.