<Application x:Class="VisualPathFinder.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    StartupUri="Window1.xaml"
    >
    <Application.Resources>
		<!-- Brushes -->
		<Color x:Key="PrimaryHighlightColor" A="255" B="255" G="255" R="255" />
		<Color x:Key="PrimaryHighlightColorWithTransparency" A="50" B="255" G="255" R="255" />
		<Color x:Key="PrimaryDarkColor" A="255" B="0" G="0" R="0" />
		<Color x:Key="PrimaryDarkColorWithTransparency" A="50" R="0" G="0" B="0" />
		<Color x:Key="PrimaryLightNeutralColor" A="255" B="170" G="170" R="170" />
		<Color x:Key="PrimaryLightNeutralColorWithTransparency" A="153" B="170" G="170" R="170" />
		<Color x:Key="PrimaryNeutralColor" A="255" B="100" G="100" R="100" />
		<Color x:Key="PrimaryDarkNeutralColor" A="255" B="75" G="75" R="75" />
		<Color x:Key="PrimaryBoldColor" A="255" R="145" G="41" B="14" />
		<Color x:Key="PrimaryInactiveColor" A="255" B="180" G="180" R="180" />
		<Color x:Key="PrimaryInactiveColorWithTransparency" A="50" B="180" G="180" R="180" />

		<SolidColorBrush x:Key="PrimaryBoldBrush" Color="{StaticResource PrimaryBoldColor}" />
		<SolidColorBrush x:Key="PrimaryHighlightBrush" Color="{StaticResource PrimaryHighlightColor}" />
		<SolidColorBrush x:Key="PrimaryHighlightWithTransparency" Color="{StaticResource PrimaryHighlightColor}" Opacity=".45" />
		<SolidColorBrush x:Key="PrimaryDarkNeutralBrush" Color="{StaticResource PrimaryDarkNeutralColor}" />
		<SolidColorBrush x:Key="PrimaryNeutralBrush" Color="{StaticResource PrimaryNeutralColor}" />
		<SolidColorBrush x:Key="PrimaryLightNeutralBrush" Color="{StaticResource PrimaryLightNeutralColor}" />
		<SolidColorBrush x:Key="PrimaryLightNeutralBrushWithTransparency" Color="{StaticResource PrimaryLightNeutralColorWithTransparency}" />
		<SolidColorBrush x:Key="PrimaryDarkBrush" Color="{StaticResource PrimaryDarkColor}" />
		<SolidColorBrush x:Key="PrimaryDarkWithTransparency" Color="{StaticResource PrimaryDarkColor}" Opacity=".45" />
		<SolidColorBrush x:Key="PrimaryInactiveBrush" Color="{StaticResource PrimaryInactiveColor}" />

		<RadialGradientBrush x:Key="ButtonGradient">
			<GradientStop Color="Transparent" Offset="0"/>
			<GradientStop Color="{StaticResource PrimaryHighlightColor}" Offset=".4"/>
			<GradientStop Color="{StaticResource PrimaryHighlightColor}" Offset=".8"/>
			<GradientStop Color="Transparent" Offset="1"/>
		</RadialGradientBrush>
		<RadialGradientBrush x:Key="ScrollButtonGradient">
			<GradientStop Color="{StaticResource PrimaryHighlightColor}" Offset=".6"/>
		</RadialGradientBrush>

		<LinearGradientBrush x:Key="VerticalScrollGradient" StartPoint="0,0" EndPoint="1,0">
			<GradientStop Color="#FDB6CADF" Offset="0" />
			<GradientStop Color="#FCC3C5FF" Offset="0.1" />
			<GradientStop Color="#FCC4D0EF" Offset="0.3" />
			<GradientStop Color="#FDB7C2DF" Offset="0.6" />
			<GradientStop Color="#FE95B3CF" Offset="0.8" />
			<GradientStop Color="#FE96AACF" Offset="1" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="DarkToNeutralVert" StartPoint="0,0" EndPoint="0,1">
			<GradientStop Color="{StaticResource PrimaryDarkColor}" Offset="0" />
			<GradientStop Color="{StaticResource PrimaryNeutralColor}" Offset="1" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="ControlGradient" StartPoint="0,0" EndPoint="1,0">
			<GradientStop Color="#FFBB5555"  Offset="0"/>
			<GradientStop Color="#FF443333" Offset="1"/>
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="DarkTransparentDark" StartPoint="0,0" EndPoint="0,1">
			<GradientStop Color="{StaticResource PrimaryDarkColor}" Offset="0" />
			<GradientStop Color="{StaticResource PrimaryDarkColorWithTransparency}" Offset=".5" />
			<GradientStop Color="{StaticResource PrimaryDarkColor}" Offset="1" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="DarkToTransparent" StartPoint="0,0" EndPoint="1,0">
			<GradientStop Color="{StaticResource PrimaryDarkColor}" Offset="0" />
			<GradientStop Color="{StaticResource PrimaryDarkColorWithTransparency}" Offset=".75" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="BoldToTransparent" StartPoint="0,0" EndPoint="1,0">
			<GradientStop Color="{StaticResource PrimaryBoldColor}" Offset="0" />
			<GradientStop Color="{StaticResource PrimaryBoldColorWithTransparency}" Offset=".75" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="BoldToTransparentVert" StartPoint="0,0" EndPoint="0,1">
			<GradientStop Color="{StaticResource PrimaryBoldColor}" Offset="0" />
			<GradientStop Color="Transparent" Offset=".5" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="BoldToDarkVert" StartPoint="0,0" EndPoint="0,1">
			<GradientStop Color="{StaticResource PrimaryBoldColor}" Offset="0" />
			<GradientStop Color="{StaticResource PrimaryDarkColor}" Offset=".8" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="DarkToBoldVert" StartPoint="0,0" EndPoint="0,1">
			<GradientStop Color="{StaticResource PrimaryDarkColor}" Offset="0" />
			<GradientStop Color="{StaticResource PrimaryBoldColor}" Offset="1" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="DarkBoldToBold" StartPoint="0,0" EndPoint="1,0">
			<GradientStop Color="{StaticResource PrimaryBoldDarkColor}" Offset="0" />
			<GradientStop Color="{StaticResource PrimaryBoldColor}" Offset="1" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="DarkToTransparentVert" StartPoint="0,0" EndPoint="0,1">
			<GradientStop Color="{StaticResource PrimaryDarkColor}" Offset="0" />
			<GradientStop Color="Transparent" Offset=".3" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="HighlightToTransparent" StartPoint="0,0" EndPoint="1,0">
			<GradientStop Color="{StaticResource PrimaryHighlightColor}" Offset="0" />
			<GradientStop Color="{StaticResource PrimaryHighlightColorWithTransparency}" Offset=".75" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="HighlightToTransparentVert" StartPoint="0,0" EndPoint="0,1">
			<GradientStop Color="{StaticResource PrimaryHighlightColor}" Offset="0" />
			<GradientStop Color="{StaticResource PrimaryHighlightColorWithTransparency}" Offset=".75" />
		</LinearGradientBrush>
		<LinearGradientBrush x:Key="InactiveToTransparent" StartPoint="0,0" EndPoint="1,0">
			<GradientStop Color="{StaticResource PrimaryInactiveColor}" Offset="0" />
			<GradientStop Color="{StaticResource PrimaryInactiveColorWithTransparency}" Offset=".75" />
		</LinearGradientBrush>

		<!-- Styles -->
		<Style TargetType="Button">
			<Setter Property="Background">
				<Setter.Value>
					<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
						<GradientStop Color="LightGray" Offset="0"/>
						<GradientStop Color="SlateGray" Offset=".6"/>
						<GradientStop Color="Gray" Offset="1"/>
					</LinearGradientBrush>
				</Setter.Value>
			</Setter>
			<Setter Property="Foreground" Value="Black"/>
			<Setter Property="FontWeight" Value="Bold"/>
			<Setter Property="BorderBrush" Value="Black"/>
			<Setter Property="Margin" Value="5"/>
		</Style>

		<Style TargetType="TextBox">
			<Setter Property="Foreground" Value="LightGray"/>
			<Setter Property="Background" Value="Black"/>
			<Setter Property="MaxWidth" Value="150"/>
			<Setter Property="MaxHeight" Value="120"/>
			<Setter Property="MaxLines" Value="10"/>
			<Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
			<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
			<Setter Property="TextWrapping" Value="Wrap"/>
			<Setter Property="BorderBrush" Value="Black"/>
		</Style>
		
		<Style TargetType="{x:Type Expander}">
			<Setter Property="Background" Value="{StaticResource ControlGradient}"/>
			<Setter Property="Padding" Value="2"/>
			<Setter Property="BorderBrush" Value="Black"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Margin" Value="5"/>
			<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
			<Setter Property="Foreground" Value="Black"/>
			<Setter Property="VerticalContentAlignment" Value="Stretch"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Expander}">
						<Grid>
							<Border BorderBrush="{TemplateBinding Border.BorderBrush}" Margin="1" CornerRadius="3,3,3,3"
												  BorderThickness="{TemplateBinding Border.BorderThickness}"
												  Background="White" SnapsToDevicePixels="True">
							</Border>
							<Border x:Name="MainBorder" BorderBrush="{TemplateBinding Border.BorderBrush}" CornerRadius="3,3,3,3"
								BorderThickness="{TemplateBinding Border.BorderThickness}"
								Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
								<DockPanel>
									<ToggleButton IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
									  MinWidth="0" Margin="3" FontWeight="ExtraBold"
									  HorizontalContentAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
									  FontStretch="{TemplateBinding TextElement.FontStretch}" VerticalContentAlignment="{TemplateBinding Control.VerticalContentAlignment}"
									  Foreground="{TemplateBinding TextElement.Foreground}" FontFamily="{TemplateBinding TextElement.FontFamily}"
									  x:Name="HeaderSite" FontStyle="{TemplateBinding TextElement.FontStyle}" FontSize="12"
									  MinHeight="0" ContentTemplate="{TemplateBinding HeaderedContentControl.HeaderTemplate}"
									  Content="{TemplateBinding HeaderedContentControl.Header}" DockPanel.Dock="Top">
										<ToggleButton.Template>
											<ControlTemplate TargetType="{x:Type ToggleButton}">
												<Border Padding="{TemplateBinding Control.Padding}">
													<Grid Background="#00FFFFFF" SnapsToDevicePixels="False">
														<Grid.ColumnDefinitions>
															<ColumnDefinition Width="19" />
															<ColumnDefinition Width="Auto" />
														</Grid.ColumnDefinitions>
														<Ellipse Height="19" Width="19" HorizontalAlignment="Center" Fill="Transparent" Name="circle" VerticalAlignment="Center" Stroke="#FFA9A9A9" />
														<Ellipse x:Name="BackGrad" Height="19" Width="19" HorizontalAlignment="Center" VerticalAlignment="Center" StrokeThickness="1" Stroke="Black">
															<Ellipse.Fill>
																<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
																	<GradientStop Color="LightGray" Offset="0"/>
																	<GradientStop Color="Black" Offset="0.5"/>
																	<GradientStop Color="LightGray" Offset="1"/>
																</LinearGradientBrush>
															</Ellipse.Fill>
														</Ellipse>
														<Ellipse Height="19" Width="19" HorizontalAlignment="Center" VerticalAlignment="Center" Stroke="Transparent"  x:Name="FadeMask" StrokeThickness="1" Opacity="0">
															<Ellipse.Fill>
																<SolidColorBrush Color="AliceBlue"/>
															</Ellipse.Fill>
														</Ellipse>
														<Path Stroke="White" StrokeThickness="2" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="arrow" SnapsToDevicePixels="False" Data="M1,1.5 L4.5,5 8,1.5"/>
														<Ellipse Height="19" Width="19" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="Highlight" StrokeThickness="2" Stroke="Transparent">
															<Ellipse.Fill>
																<DrawingBrush>
																	<DrawingBrush.Drawing>
																		<GeometryDrawing>
																			<GeometryDrawing.Brush>
																				<LinearGradientBrush Opacity="0.6" StartPoint="0,0" EndPoint="0,1">
																					<GradientStop Color="White" Offset="0"/>
																					<GradientStop Color="#CCFFFFFF" Offset="1"/>
																				</LinearGradientBrush>
																			</GeometryDrawing.Brush>
																			<GeometryDrawing.Geometry>
																				<EllipseGeometry Center="0.5,0.5" RadiusX="0.25" RadiusY="0.5"/>
																			</GeometryDrawing.Geometry>
																		</GeometryDrawing>
																	</DrawingBrush.Drawing>
																	<DrawingBrush.RelativeTransform>
																		<ScaleTransform CenterX="0.5" CenterY="0" ScaleX="1.05" ScaleY="0.6"/>
																	</DrawingBrush.RelativeTransform>
																</DrawingBrush>
															</Ellipse.Fill>
														</Ellipse>
														<ContentPresenter Margin="4,0,0,0" HorizontalAlignment="Left" x:Name="ContentSite"
														  VerticalAlignment="Center" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
														  RecognizesAccessKey="True" Content="{TemplateBinding ContentControl.Content}" Grid.Column="1" />
													</Grid>
												</Border>
												<ControlTemplate.Triggers>
													<Trigger Property="ToggleButton.IsChecked" Value="True">
														<Setter Property="LayoutTransform" TargetName="arrow">
															<Setter.Value>
																<ScaleTransform ScaleY="-1"/>
															</Setter.Value>
														</Setter>
													</Trigger>
													<Trigger Property="ToggleButton.IsPressed" Value="True">
														<Setter TargetName="BackGrad"  Property="RenderTransform">
															<Setter.Value>
																<TranslateTransform X="0" Y="1"/>
															</Setter.Value>
														</Setter>
													</Trigger>
													<EventTrigger RoutedEvent="UIElement.MouseEnter">
														<EventTrigger.Actions>
															<BeginStoryboard>
																<Storyboard>
																	<DoubleAnimation Storyboard.TargetName="FadeMask" Storyboard.TargetProperty="Opacity" To="0.4" Duration="0:0:0.25"/>
																</Storyboard>
															</BeginStoryboard>
														</EventTrigger.Actions>
													</EventTrigger>
													<EventTrigger RoutedEvent="UIElement.MouseLeave">
														<EventTrigger.Actions>
															<BeginStoryboard>
																<Storyboard>
																	<DoubleAnimation Storyboard.TargetName="FadeMask" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.25"/>
																</Storyboard>
															</BeginStoryboard>
														</EventTrigger.Actions>
													</EventTrigger>
												</ControlTemplate.Triggers>
											</ControlTemplate>
										</ToggleButton.Template>
									</ToggleButton>
									<Border x:Name="ExpandSite" Margin="5,0,5,5" Background="#77FFFFFF" BorderBrush="{TemplateBinding Border.BorderBrush}" BorderThickness="{TemplateBinding Border.BorderThickness}">
										<Border.LayoutTransform>
											<ScaleTransform ScaleY="0"/>
										</Border.LayoutTransform>
										<ContentPresenter Margin="{TemplateBinding Control.Padding}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
										   VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}"
										  Focusable="False" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}"
										  Content="{TemplateBinding ContentControl.Content}" DockPanel.Dock="Bottom">
										</ContentPresenter>
									</Border >
								</DockPanel>
							</Border>
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="Expander.IsExpanded" Value="True">
								<Trigger.EnterActions>
									<BeginStoryboard>
										<Storyboard>
											<DoubleAnimation Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="LayoutTransform.ScaleY" To="1" Duration="0:0:0.3"/>
											<DoubleAnimation Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.3"/>
										</Storyboard>
									</BeginStoryboard>
								</Trigger.EnterActions>
								<Trigger.ExitActions>
									<BeginStoryboard>
										<Storyboard>
											<DoubleAnimation Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="LayoutTransform.ScaleY" To="0" Duration="0:0:0.3"/>
											<DoubleAnimation Storyboard.TargetName="ExpandSite" Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.3"/>
										</Storyboard>
									</BeginStoryboard>
								</Trigger.ExitActions>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
    </Application.Resources>
</Application>
