<!-- 
This resource dictionary is used by the MainWindow. 
-->
<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  >

  <!--
  This style configures both of the main content areas in the main window.
  -->
  <Style x:Key="MainHCCStyle" TargetType="{x:Type HeaderedContentControl}">
    <Setter Property="HeaderTemplate">
      <Setter.Value>
        <DataTemplate>
          <Border 
            Background="{StaticResource Brush_HeaderBackground}" 
            BorderBrush="LightGray" 
            BorderThickness="1" 
            CornerRadius="5" 
            Margin="4" 
            Padding="4" 
            SnapsToDevicePixels="True" 
            >
            <TextBlock 
              FontSize="14"
              FontWeight="Bold"
              Foreground="White" 
              HorizontalAlignment="Center"  
              Text="{TemplateBinding Content}" 
              />
          </Border>
        </DataTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="IsTabStop" Value="False" />
    <Setter Property="Template">
      <Setter.Value>
        <!-- 
        This template ensures that content of a HeaderedContentControl 
        fills the available vertical space. 
        -->
        <ControlTemplate TargetType="{x:Type HeaderedContentControl}">
          <DockPanel>
            <ContentPresenter 
              DockPanel.Dock="Top"
              ContentSource="Header" 
              ContentTemplate="{TemplateBinding HeaderTemplate}" 
              />
            <ContentPresenter 
              ContentSource="Content" 
              ContentTemplate="{TemplateBinding ContentTemplate}" 
              />
          </DockPanel>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <!--
  This style ensures that the borders in the main window are consistent.
  -->
  <Style x:Key="MainBorderStyle" TargetType="{x:Type Border}">
    <Setter Property="Background" Value="WhiteSmoke" />
    <Setter Property="BorderBrush" Value="LightGray" />
    <Setter Property="BorderThickness" Value="1" />
    <Setter Property="CornerRadius" Value="5" />
    <Setter Property="SnapsToDevicePixels" Value="True" />
  </Style>

  <!--
  This template explains how to render the list of commands on the left
  side in the main window (the 'Control Panel' area).
  -->
    <Style x:Key="HyperlinkButton" TargetType="Button">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <TextBlock Margin="8,6">
                        <Hyperlink>
                            <TextBlock Text="{TemplateBinding Property={x:Static ContentControl.ContentProperty}}"/>
                        </Hyperlink>
                    </TextBlock>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>