title: System.ArgumentException: 'Value does not fall within the expected range.' on static class
body: <p>I'm using inside my static setup class the following method in my Winui3 App:</p>
  <pre><code>private static async void CheckDocumentsCopyDialog(string targetPath)
      {
          var resourceLoader = Windows.ApplicationModel.Resources.ResourceLoader.GetForViewIndependentUse();
          ContentDialog checkDocumentsCopy = new ContentDialog()
          {
              Title = Constants.App.Name + &quot; &quot; + resourceLoader.GetString(&quot;MsgSetupCheckDocumentHeader&quot;),
              Content = resourceLoader.GetString(&quot;MsgSetupCheckDocumentsCopy&quot;) + &quot; &quot; + targetPath + &quot;.&quot;,
              CloseButtonText = &quot;Ok&quot;
          };
          await checkDocumentsCopy.ShowAsync();
      }
  </code></pre>
  <p>As far as i know it follows Microsofts WinUI3 documentation. But i'm getting:</p>
  <p><a href="https://i.stack.imgur.com/onasA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/onasA.png" alt="enter image description here" /></a></p>
  <p>Maybe anyone knows, what i can do to fix it?</p>