title: Add custom modal dialog matching Modern UI for WPF (MUI)
body: <p>I'm using ModernUI for WPF (MUI) available on codeplex <a href="https://mui.codeplex.com/" rel="nofollow">here</a>.
  It's a nice framework and I have no issues using it as a container for my pages.</p>
  
  <p>I'm now trying to add a custom modal dialog, but declaring as a simple Window doesn't keep the nice style MUI has. I've been trying to understand the source code but I can't figure out how to create a window like it does.</p>
  
  <p>Can someone please give me a couple of guidelines on how to achieve a custom modal dialog with this framework?</p>
  
  <p>EDIT: This is the solution I've found with the help of XAMlMAX:</p>
  
  <pre><code>&lt;mui:ModernWindow
  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:sys="clr-namespace:System;assembly=mscorlib"
  xmlns:lex="http://wpflocalizeextension.codeplex.com" 
  xmlns:SysClient="clr-namespace:SysClient" 
  xmlns:System="clr-namespace:System;assembly=mscorlib" 
  x:Class="SysClient.Pages.GenericWindow" 
  xmlns:mui="http://firstfloorsoftware.com/ModernUI"    
  mc:Ignorable="d" Width="800" Height="520" Activated="Window_Activated" Margin="0,0,0,0"&gt;
  &lt;Window.Resources&gt;
      &lt;ResourceDictionary&gt;
          &lt;ResourceDictionary.MergedDictionaries&gt;
              &lt;ResourceDictionary Source="/FirstFloor.ModernUI;component/Themes/ModernWindowPopUp.xaml" /&gt;
          &lt;/ResourceDictionary.MergedDictionaries&gt;
      &lt;/ResourceDictionary&gt;
  &lt;/Window.Resources&gt;
  &lt;Window.Style&gt;
      &lt;StaticResource ResourceKey="ModernWindowPopUp"&gt;&lt;/StaticResource&gt;
  &lt;/Window.Style&gt;
  </code></pre>
  
  <p></p>
  
  <p>And this is how I use it:</p>
  
  <pre><code>  GenericWindow w = new GenericWindow()
    {
        Title = "Add Order",
        ShowInTaskbar = false,               // don't show the dialog on the taskbar
        //Topmost = true,                    // ensure we're Always On Top
        ResizeMode = ResizeMode.NoResize,    // remove excess caption bar buttons
        Owner = Application.Current.MainWindow,
        Tag = new ParametersClass(OrderTypeId),
        ContentSource = new Uri("/Windows/AddOrderWindow.xaml", UriKind.Relative)
    };
    w.ShowDialog();
  </code></pre>