<!-- $c18 JPS 07/02/13 SPR 703523, PRJ 17153. Replace PMGroupBoxHeaderBack brush with ImageBrush_LogoBG to achieve the double-line border with multiple colors. -->
<!-- $c17  CCL 06/24/09 Remove xaml style that does not work. -->
<!-- $c16  CCL 06/03/09 Made sure message group boxes reference resource brush -->
<!-- $c15  CCL 04/05/09 Update styles to fix access text and checkbox issues in expander headers -->
<!-- $c14  NBA 01/20/09 More changes to expander styles -->
<!-- $c13  CCL 01/12/09 New expander headers style to accomodate checkbox -->
<!-- $c12  CCL 11/11/08 added new colored message textblock styles and removed unused lines -->
<!-- $c11  CCL 10/10/08 updated groupbox titles to trim with ellipses -->
<!-- $c10  CCL 06/04/08 SPR 437724 - update message expander style -->
<!-- $c9   CCL 05/20/08 added IsExpanded setter for future adjustment -->
<!-- $c8   CCL 05/20/08 SPR 431475 - update Expander style -->
<!-- $c7   DPS 04/30/08 use valid variable names and existing function names -->
<!-- $c6   brs 02/07/08 Added message box (info) template -->
<!-- $c5   DRD 01/09/08 Dig the content to display for the Expander Header out of the Header -->
<!-- $c4   brs 01/08/08 Updated expander body templates and added header templates -->
<!-- $c3   JCW 12/02/07 Improved clickability of groupbox headers for expand/collapse -->
<!-- $c2   JCW 11/30/07 More updates for default group boxes. Removed unused styles -->
<!-- $c1   BRS 11/13/07 setup system styles -->
<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d">

	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="BrushesDictionary.xaml"/>
	</ResourceDictionary.MergedDictionaries>


	<Style x:Key="PMGroupBox" TargetType="{x:Type Expander}">
		<Setter Property="IsExpanded" Value="False"/> 
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Expander}">
					<Border Margin="0,0,0,6" Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0,0,0,0">
						<DockPanel>
							<Border
								x:Name="Border"
								DockPanel.Dock="Top"
								BorderThickness="1"
								CornerRadius="0,0,0,0" BorderBrush="{DynamicResource PMGroupBoxBorder}" Background="{DynamicResource ImageBrush_LogoBG}" Height="20">
								<Grid>
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="*" />
									</Grid.ColumnDefinitions>
									<ToggleButton
										Grid.Column="0"
										IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
										OverridesDefaultStyle="True"
										Template="{DynamicResource PMGroupBoxToggleButton}"
										HorizontalAlignment="Stretch" Width="Auto" Content="{TemplateBinding Header}"/>
								</Grid>
							</Border>
							<Border
								x:Name="Content"
								DockPanel.Dock="Bottom"
								Background="{DynamicResource PMGroupBoxBack}"
								BorderBrush="{DynamicResource PMGroupBoxBorder}"
								BorderThickness="1,0,1,1"
								CornerRadius="0,0,0,0" Visibility="Collapsed">
								<ContentPresenter Visibility="Collapsed" x:Name="ExpandSite" Margin="4,4,4,4"/>
							</Border>
						</DockPanel>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsExpanded" Value="true">
							<Setter Property="Visibility" TargetName="ExpandSite" Value="Visible"/>
							<Setter Property="Visibility" TargetName="Content" Value="Visible"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter TargetName="Border" Property="Background"
								Value="{StaticResource DisabledBackgroundBrush}" />
							<Setter TargetName="Border" Property="BorderBrush"
								Value="{StaticResource DisabledBorderBrush}" />
							<Setter Property="Foreground"
								Value="{StaticResource DisabledForegroundBrush}"/>
						</Trigger>

					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	
	<ControlTemplate x:Key="PMGroupBoxToggleButton" TargetType="{x:Type ToggleButton}">
		<Border
			x:Name="Border"
			CornerRadius="2,0,0,0"
			BorderThickness="0,0,1,0" HorizontalAlignment="Stretch" Width="Auto" Background="#00FFFFFF">
			<Grid>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="*"/>
					<ColumnDefinition Width="24"/>
				</Grid.ColumnDefinitions>
				<AccessText Foreground="{DynamicResource PMText}" Style="{DynamicResource PMGroupBoxHeaderAccessText}" Text="{TemplateBinding Content}"/>
				<StackPanel x:Name="stackPanel" d:LayoutOverrides="Height" Grid.Column="1" SnapsToDevicePixels="True" VerticalAlignment="Center">
					<Path Stretch="Fill" Stroke="{DynamicResource PMText}" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" StrokeThickness="1.5" Width="8.75" Height="4.25" Data="M0,0L4,4 8,0" x:Name="path"/>
					<Path Stretch="Fill" Stroke="{DynamicResource PMText}" StrokeEndLineCap="Flat" StrokeStartLineCap="Flat" StrokeThickness="1.5" Width="8.75" Height="4.25" Data="M0,0L4,4 8,0" Visibility="Visible" x:Name="path1"/>
				</StackPanel>
			</Grid>
		</Border>
		<ControlTemplate.Triggers>
			<Trigger Property="IsMouseOver" Value="true">
				<Setter Property="Stroke" TargetName="path" Value="{DynamicResource PMArrowOver}"/>
				<Setter Property="Stroke" TargetName="path1" Value="{DynamicResource PMArrowOver}"/>
			</Trigger>
			<Trigger Property="IsChecked" Value="true">
				<Setter Property="RenderTransformOrigin" TargetName="stackPanel" Value="0.5,0.5"/>
				<Setter Property="RenderTransform" TargetName="stackPanel">
					<Setter.Value>
						<TransformGroup>
							<ScaleTransform ScaleX="1" ScaleY="-1"/>
							<SkewTransform AngleX="0" AngleY="0"/>
							<RotateTransform Angle="0"/>
							<TranslateTransform X="0" Y="0"/>
						</TransformGroup>
					</Setter.Value>
				</Setter>
			</Trigger>
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="Foreground"
					Value="{StaticResource DisabledForegroundBrush}"/>
			</Trigger>
		</ControlTemplate.Triggers>
	</ControlTemplate>

	<Style x:Key="PMGroupBoxHeaderAccessText" TargetType="{x:Type AccessText}">
		<Setter Property="FontWeight" Value="Bold"/>
		<Setter Property="HorizontalAlignment" Value="Stretch"/>
		<Setter Property="Foreground" Value="{DynamicResource PMText}"/>
		<Setter Property="TextTrimming" Value="CharacterEllipsis"/>
		<Setter Property="Margin" Value="4,0,0,0"/>
	</Style>

	<Style x:Key="PMMessageBoxInformation" TargetType="{x:Type Expander}">
		<Setter Property="IsExpanded" Value="True"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Expander}">
					<Border Margin="0,0,0,6" Background="{x:Null}" BorderBrush="{x:Null}" BorderThickness="0,0,0,0">
						<DockPanel>
							<Border
								x:Name="Border"
								DockPanel.Dock="Top"
								BorderThickness="1"
								CornerRadius="0,0,0,0" BorderBrush="{DynamicResource PMGroupBoxBorder}" Background="{DynamicResource ImageBrush_LogoBG}" Height="20">
								<Grid>
									<Grid.ColumnDefinitions>
										<ColumnDefinition Width="*" />
									</Grid.ColumnDefinitions>
									<ToggleButton
										Grid.Column="0"
										IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
										OverridesDefaultStyle="True"
										Template="{DynamicResource PMGroupBoxToggleButton}"
										HorizontalAlignment="Stretch" Width="Auto" Content="{TemplateBinding Header}"/>
								</Grid>
							</Border>
							<Border
								x:Name="Content"
								DockPanel.Dock="Bottom"
								Background="{DynamicResource PMGroupBoxBackWarning}"
								BorderBrush="{DynamicResource PMGroupBoxBorder}"
								BorderThickness="1,0,1,1"
								CornerRadius="0,0,0,0" Visibility="Collapsed">
								<ContentPresenter Visibility="Collapsed" x:Name="ExpandSite" Margin="4,4,4,4"/>
							</Border>
						</DockPanel>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsExpanded" Value="true">
							<Setter Property="Visibility" TargetName="ExpandSite" Value="Visible"/>
							<Setter Property="Visibility" TargetName="Content" Value="Visible"/>
						</Trigger>
						<Trigger Property="IsEnabled" Value="False">
							<Setter TargetName="Border" Property="Background"
								Value="{StaticResource DisabledBackgroundBrush}" />
							<Setter TargetName="Border" Property="BorderBrush"
								Value="{StaticResource DisabledBorderBrush}" />
							<Setter Property="Foreground"
								Value="{StaticResource DisabledForegroundBrush}"/>
						</Trigger>

					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

	<Style x:Key="MessageTextError" TargetType="{x:Type TextBlock}">
		<Setter Property="TextWrapping" Value="Wrap"/>
		<Setter Property="TextTrimming" Value="None"/>
		<Setter Property="Background" Value="{DynamicResource PMGroupBoxBackAlert}"/>
		<Setter Property="Padding" Value="4"/>
		<Setter Property="Margin" Value="-4"/>
	</Style>

	<Style x:Key="MessageTextWarning" TargetType="{x:Type TextBlock}">
		<Setter Property="TextWrapping" Value="Wrap"/>
		<Setter Property="TextTrimming" Value="None"/>
		<Setter Property="Background" Value="{DynamicResource PMGroupBoxBackWarning}"/>
		<Setter Property="Padding" Value="4"/>
		<Setter Property="Margin" Value="-4"/>
	</Style>

	<Style x:Key="MessageTextGreen" TargetType="{x:Type TextBlock}">
		<Setter Property="TextWrapping" Value="Wrap"/>
		<Setter Property="TextTrimming" Value="None"/>
		<Setter Property="Background" Value="{DynamicResource PMGroupBoxBackOK}"/>
		<Setter Property="Padding" Value="4"/>
		<Setter Property="Margin" Value="-4"/>
	</Style>

</ResourceDictionary>