In an application, I need to open multiple popups but need to check if a popup already exists with a given reference (guid). If so, I will first close the existing popup and open a new one. I am using the below code but it looks like if my partial class variable Guid is reset each time a new popup is created and therefore the condition MRwin.GetGuid() == this.guid is always true. It is like if the guid variable was declared as static :-S
Any idea?

```
public partial class MyPopup: MetroWindow 
{
  private Guid guid;

  public Guid GetGuid() 
  {
    return guid;
  }

  public MyPopup(Guid guid) 
  {
    InitializeComponent();
    this.guid = guid;

    foreach(var win in Application.Current.Windows) 
    {
      if (win is Forms.MyPopup) 
      {
        Forms.MyPopup cWin = (Forms.MyPopup) win;

        // Close if there is any open popup window related to the same Guid
        if (cWin.GetGuid() == this.guid) 
        {
          cWin.Close();
        }
      }
    }
  }
}

```