title: SampleMessageDialog in material design WPF
body: <p>Hey all I am trying to figure out how to call the SampleMessageDialog in my own app.</p>
  
  <p>So far this is the code i have for a button on my form that should open the message box:</p>
  
  <pre><code>Private Async Sub BrowseButton_Copy_Click(sender As Object, e As RoutedEventArgs) Handles BrowseButton_Copy.Click
      msgBoxPop.showPop()
  End Sub
  </code></pre>
  
  <p>And this is the <strong>showPop</strong>:</p>
  
  <pre><code>Imports MaterialDesignThemes.Wpf
  Imports newRegisterProg.MaterialDesignColors.WpfExample.Domain
  
  Public Class msgBoxPop
      Public Shared Async Sub showPop()
          Dim sampleMessageDialog = New SampleMessageDialog()
  
          With sampleMessageDialog
              .Message.Text = "TEST!"
          End With
  
          Await DialogHost.Show(sampleMessageDialog, "RootDialog")
      End Sub
  End Class
  </code></pre>
  
  <p>And finally this is the usercontrol:</p>
  
  <pre><code>&lt;UserControl x:Class="MaterialDesignColors.WpfExample.Domain.SampleMessageDialog"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
               xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
               xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
               mc:Ignorable="d" 
               x:Name="messagePOP"
               d:DesignHeight="300" d:DesignWidth="300"
               MaxWidth="400"&gt;
      &lt;Grid Margin="16"&gt;
          &lt;Grid.RowDefinitions&gt;
              &lt;RowDefinition /&gt;
              &lt;RowDefinition /&gt;
          &lt;/Grid.RowDefinitions&gt;
          &lt;TextBlock x:Name="Message" 
                     Margin="0 6 0 0"
                     FontSize="18" Grid.Row="0"/&gt;
          &lt;Button Grid.Row="1" 
                  IsDefault="True" Style="{DynamicResource MaterialDesignFlatButton}"
                  HorizontalAlignment="Right"
                  Margin="16 16 16 0"
                  Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"&gt;
              ACCEPT
          &lt;/Button&gt;
      &lt;/Grid&gt;
  &lt;/UserControl&gt;
  </code></pre>
  
  <p>Currently when I click the button it gives an error of:</p>
  
  <blockquote>
    <p>Additional information: No loaded DialogHost instances.</p>
  </blockquote>
  
  <p>on line:</p>
  
  <pre><code>Await DialogHost.Show(sampleMessageDialog, "RootDialog")
  </code></pre>