title: System.ArgumentException: 'Value does not fall within the expected range.' on Content Dialog
body: <p>I'm triyng to make a login system in my UWP (WinUI3) app and when I try to lauch de Login Content Dialog it crashes throwing this error:</p>
  <blockquote>
  <p>System.ArgumentException: 'Value does not fall within the expected range.'</p>
  </blockquote>
  <p>on <code>await messageDialog.ShowAsync();</code></p>
  <p>Code on app.xaml.cs:</p>
  <pre><code>protected override async void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args)
  {
  
      m_window = new MainWindow();
      m_window.Activate();
  
      Login();
  
  }
  
  protected async void Login()
  {
      var messageDialog = new ContentDialogs.LoginDialog();
      await messageDialog.ShowAsync();
  
      if (App.Aplicacao.Utilizador == null)
      {
          m_window.Close();
          return;
      }
  }
  </code></pre>
  <p>Content Dialog XAML:</p>
  <pre><code>&lt;ContentDialog
      x:Class=&quot;xizSoft.ContentDialogs.LoginDialog&quot;
      xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;
      xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;
      xmlns:local=&quot;using:xizSoft.ContentDialogs&quot;
      xmlns:d=&quot;http://schemas.microsoft.com/expression/blend/2008&quot;
      xmlns:mc=&quot;http://schemas.openxmlformats.org/markup-compatibility/2006&quot;
      mc:Ignorable=&quot;d&quot;
      Background=&quot;{ThemeResource SystemControlAcrylicWindowBrush}&quot;&gt;
  
      &lt;Grid&gt;
      &lt;/Grid&gt;
  &lt;/ContentDialog&gt;
  </code></pre>
  <p>Code-behind:</p>
  <pre><code>public LoginDialog()
  {
      this.InitializeComponent();
  }
  </code></pre>