title: Defining own ChildWindow with BusyIndicator
body: <p>I'm trying to create my own ChildWindow whith BusyIndicator. This ChildWindow will be a base class for my other child windows. I started from creating a class which inherits from ChildWindow and I added some additional DependencyProperties.</p>
  
  <pre><code> public class ChildWindowBase : ChildWindow
      {
  
          public bool IsBusy
          {
              get { return (bool)GetValue(IsBusyProperty); }
              set { SetValue(IsBusyProperty, value); }
          }
  
  
          public static readonly DependencyProperty IsBusyProperty =
              DependencyProperty.Register("IsBusy", typeof(bool), typeof(ChildWindowBase), new PropertyMetadata(false));
  
  
  
          public string BusyContent
          {
              get { return (string)GetValue(BusyContentProperty); }
              set { SetValue(BusyContentProperty, value); }
          }
  
          // Using a DependencyProperty as the backing store for BusyContent.  This enables animation, styling, binding, etc...
          public static readonly DependencyProperty BusyContentProperty =
              DependencyProperty.Register("BusyContent", typeof(string), typeof(ChildWindowBase), new PropertyMetadata("Busy..."));
  
      }
  </code></pre>
  
  <p>In the next step I created a style which modifies template of ChildWindow</p>
  
  <pre><code>&lt;ResourceDictionary
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
      xmlns:Controls="clr-namespace:Sockets.Shared.Controls;assembly=Sockets.Shared"&gt;
  
      &lt;Style TargetType="Controls:ChildWindowBase"&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate&gt;
                      &lt;toolkit:BusyIndicator HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BusyContent="{TemplateBinding BusyContent}" IsBusy="{TemplateBinding IsBusy}" &gt;
                          &lt;ContentPresenter Content="{TemplateBinding Content}"&gt;&lt;/ContentPresenter&gt;
                      &lt;/toolkit:BusyIndicator&gt;
                  &lt;/ControlTemplate&gt;
              &lt;/Setter.Value&gt;
          &lt;/Setter&gt;
      &lt;/Style&gt;
  &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p>Now if I want to create another ChildWindow I do sth like that</p>
  
  <pre><code>&lt;Controls:ChildWindowBase x:Class="Client.Silverlight.Views.LoginView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
             Title="LoginView" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
                       xmlns:Controls="clr-namespace:Sockets.Shared.Controls;assembly=Sockets.Shared" Width="400" Height="300" IsBusy="True"&gt;
  //some code in here
  &lt;/Controls:ChildWindowBase&gt;
  </code></pre>
  
  <p>The problem is that my ChildWindows do not have an application bar (bar with close button and window title). Is there any way to modify my template to show it, or maybe I have to write my custom application bar? If so what is the best way to do that ?</p>