
<!--// Copyright © ComponentOne LLC.
// This file is part of the ComponentOne Studio Silverlight Edition
// Please visit www.componentone.com for details
// All other rights reserved.
-->

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c1="using:C1.Xaml"
xmlns:c1Maps="using:C1.Xaml.Maps"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
	
	<ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="ms-appx:///C1.UWP/themes/Common.xaml"/>
	</ResourceDictionary.MergedDictionaries>

    <ResourceDictionary.ThemeDictionaries>
        <ResourceDictionary x:Key="Default">
            
	        <!-- Brush @ C1Map Pressed State -->
	        <SolidColorBrush x:Key="MapPressedBackgroundThemeBrush" Color="{ThemeResource SelectedColor}"/>
		
	        <!-- Brush @ C1Map PanTool Background -->
            <SolidColorBrush x:Key="MapBackgroundThemeBrush" Color="#66000000"/>

	        <!-- Brush @ C1Map Foreground -->
            <SolidColorBrush x:Key="MapForegroundThemeBrush" Color="White"/>

            <!-- Thickness & Brush @ C1Map Border -->
            <Thickness x:Key="MapBorderThemeThickness">2</Thickness>
            <SolidColorBrush x:Key="MapBorderThemeBrush" Color="White"/>

            <!-- Style @ C1Map PanTool Arrow -->
            <Style x:Key="MapPanToolArrowStyle" TargetType="Path">
                <Setter Property="Width" Value="10"/>
                <Setter Property="Height" Value="10"/>
                <Setter Property="Margin" Value="2"/>
            </Style>

            <Style x:Key="ScaleBorder" TargetType="Border">
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="BorderBrush" Value="White"/>
                <Setter Property="BorderThickness" Value="2"/>
            </Style>

        </ResourceDictionary>
        <ResourceDictionary x:Key="Light">
            
            <!-- Brush @ C1Map Pressed State -->
            <SolidColorBrush x:Key="MapPressedBackgroundThemeBrush" Color="{ThemeResource SelectedColor}"/>

            <!-- Brush @ C1Map PanTool Background -->
            <SolidColorBrush x:Key="MapBackgroundThemeBrush" Color="#66FFFFFF"/>

            <!-- Brush @ C1Map Foreground -->
            <SolidColorBrush x:Key="MapForegroundThemeBrush" Color="#FF000000"/>

            <!-- Thickness & Brush @ C1Map Border -->
            <Thickness x:Key="MapBorderThemeThickness">2</Thickness>
            <SolidColorBrush x:Key="MapBorderThemeBrush" Color="#FF000000"/>

            <!-- Style @ C1Map PanTool Arrow -->
            <Style x:Key="MapPanToolArrowStyle" TargetType="Path">
                <Setter Property="Width" Value="10"/>
                <Setter Property="Height" Value="10"/>
                <Setter Property="Margin" Value="4"/>
            </Style>

            <Style x:Key="ScaleBorder" TargetType="Border">
                <Setter Property="Background" Value="Transparent"/>
                <Setter Property="BorderBrush" Value="White"/>
                <Setter Property="BorderThickness" Value="2"/>
            </Style>

        </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrast">

            <!-- Brush @ C1Map Pressed State -->
            <SolidColorBrush x:Key="MapPressedBackgroundThemeBrush" Color="{ThemeResource SelectedColor}"/>

            <!-- Brush @ C1Map PanTool Background -->
            <SolidColorBrush x:Key="MapBackgroundThemeBrush" Color="Black"/>

            <!-- Brush @ C1Map Foreground -->
            <SolidColorBrush x:Key="MapForegroundThemeBrush" Color="#FFFFFF00"/>

            <!-- Thickness & Brush @ C1Map Border -->
            <Thickness x:Key="MapBorderThemeThickness">2</Thickness>
            <SolidColorBrush x:Key="MapBorderThemeBrush" Color="White"/>

            <!-- Style @ C1Map PanTool Arrow -->
            <Style x:Key="MapPanToolArrowStyle" TargetType="Path">
                <Setter Property="Width" Value="10"/>
                <Setter Property="Height" Value="10"/>
                <Setter Property="Margin" Value="2"/>
            </Style>

        </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrastBlack">

            <!-- Brush @ C1Map Pressed State -->
            <SolidColorBrush x:Key="MapPressedBackgroundThemeBrush" Color="{ThemeResource SelectedColor}"/>

            <!-- Brush @ C1Map PanTool Background -->
            <SolidColorBrush x:Key="MapBackgroundThemeBrush" Color="Black"/>

            <!-- Brush @ C1Map Foreground -->
            <SolidColorBrush x:Key="MapForegroundThemeBrush" Color="White"/>

            <!-- Thickness & Brush @ C1Map Border -->
            <Thickness x:Key="MapBorderThemeThickness">2</Thickness>
            <SolidColorBrush x:Key="MapBorderThemeBrush" Color="White"/>

            <!-- Style @ C1Map PanTool Arrow -->
            <Style x:Key="MapPanToolArrowStyle" TargetType="Path">
                <Setter Property="Width" Value="10"/>
                <Setter Property="Height" Value="10"/>
                <Setter Property="Margin" Value="2"/>
            </Style>

        </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrastWhite">

            <!-- Brush @ C1Map Pressed State -->
            <SolidColorBrush x:Key="MapPressedBackgroundThemeBrush" Color="{ThemeResource SelectedColor}"/>

            <!-- Brush @ C1Map PanTool Background -->
            <SolidColorBrush x:Key="MapBackgroundThemeBrush" Color="White"/>

            <!-- Brush @ C1Map Foreground -->
            <SolidColorBrush x:Key="MapForegroundThemeBrush" Color="Black"/>

            <!-- Thickness & Brush @ C1Map Border -->
            <Thickness x:Key="MapBorderThemeThickness">2</Thickness>
            <SolidColorBrush x:Key="MapBorderThemeBrush" Color="Black"/>

            <!-- Style @ C1Map PanTool Arrow -->
            <Style x:Key="MapPanToolArrowStyle" TargetType="Path">
                <Setter Property="Width" Value="10"/>
                <Setter Property="Height" Value="10"/>
                <Setter Property="Margin" Value="2"/>
            </Style>

        </ResourceDictionary>
    </ResourceDictionary.ThemeDictionaries>

    <!-- Style @ C1Map PanTool Border -->
    <Style x:Key="MapPanBorderStyle" TargetType="Border">
        <Setter Property="Width" Value="54"/>
        <Setter Property="Height" Value="54"/>
        <Setter Property="CornerRadius" Value="27"/>
    </Style>

	<!-- Style @ C1Map Scale Item -->
    <Style x:Key="MapScaleItemStyle" TargetType="Border">
        <Setter Property="MinWidth" Value="20"/>
        <Setter Property="MaxWidth" Value="158"/>
        <Setter Property="Height" Value="8"/>
        <Setter Property="HorizontalAlignment" Value="Left"/>
        <Setter Property="VerticalAlignment" Value="Center"/>
        <Setter Property="Background" Value="Orange"/>
        <Setter Property="CornerRadius" Value="1" />
        <Setter Property="BorderBrush" Value="Blue" />
        <Setter Property="BorderThickness" Value="1" />
    </Style>

    <!-- Style @ C1Map Scale Label -->
	<Style x:Key="MapScaleLabelStyle" TargetType="TextBlock">
		<Setter Property="HorizontalAlignment" Value="Right"/>
		<Setter Property="VerticalAlignment" Value="Center"/>
		<Setter Property="Margin" Value="3"/>
	</Style>

	<!--C1Maps-->
	<Style TargetType="c1Maps:C1Maps">
        <!-- #if SILVERLIGHT -->
        <Setter Property="Background" Value="{ThemeResource BaseColorBrush}"/>
        <Setter Property="BorderBrush" Value="{ThemeResource MapBorderThemeBrush}"/>
        <Setter Property="MouseOverBrush" Value="{ThemeResource MouseOverBrush}"/>
        <Setter Property="PressedBrush" Value="{ThemeResource MouseOverBrush}"/>
        <Setter Property="Foreground" Value="{ThemeResource MapForegroundThemeBrush}"/>
        <!-- #endif -->
        <!-- #if !silverlight
        <Setter Property="Background" Value="{StaticResource WpfInputBaseBrush}"/>
        <Setter Property="BorderBrush" Value="{StaticResource WpfInputBorderBrush}"/>
        <Setter Property="MouseOverBrush" Value="{StaticResource WpfInputMouseOverBrush}"/>
		<Setter Property="PressedBrush" Value="{StaticResource WpfInputMouseOverBrush}"/>
        <Setter Property="Foreground" Value="{StaticResource WpfInputMapForegroundThemeBrush}"/>
        #endif -->
        <Setter Property="BorderThickness" Value="{ThemeResource MapBorderThemeThickness}"/>
		<Setter Property="FontSize" Value="9"/>
		<Setter Property="Padding" Value="10"/>
        <Setter Property="InertialScrolling" Value="True" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1Maps:C1Maps">
					<Border>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard />
								</VisualState>
								<VisualState x:Name="Disabled">
									<Storyboard>
										<DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
											<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
										</DoubleAnimationUsingKeyFrames>
									</Storyboard>
								</VisualState>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Grid>
							<c1Maps:C1MapTilesLayer x:Name="Tiles"/>
							<Grid x:Name="Layers" />
							<Border x:Name="DisabledVisualElement" 
								Background="{ThemeResource DisabledBrush}"
								IsHitTestVisible="False"
								Opacity="0"
								Visibility="{TemplateBinding DisabledCuesVisibility}"/>
						</Grid>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!-- C1MapTilesLayer -->
	<Style TargetType="c1Maps:C1MapTilesLayer">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1Maps:C1MapTilesLayer">
					<Grid x:Name="Root"/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!-- C1MultiScaleImage -->
	<Style TargetType="c1Maps:C1MultiScaleImage">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1Maps:C1MultiScaleImage">
                    <Canvas x:Name="Root">
                    </Canvas>
                </ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!-- C1MapItemsLayer -->
	<Style TargetType="c1Maps:C1MapItemsLayer">
		<Setter Property="ItemsPanel">
			<Setter.Value>
				<ItemsPanelTemplate>
					<c1Maps:C1MapCanvas />
				</ItemsPanelTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1Maps:C1MapItemsLayer">
					<ItemsPresenter />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!-- C1MapVirtualLayer -->
	<Style TargetType="c1Maps:C1MapVirtualLayer">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1Maps:C1MapVirtualLayer">
					<c1Maps:C1MapItemsLayer x:Name="ItemsHost"/>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!-- C1MapToolsLayer -->
	<Style TargetType="c1Maps:C1MapNavigator">
        <Setter Property="Background" Value="{ThemeResource MapBackgroundThemeBrush}"/>
        <Setter Property="Foreground" Value="{ThemeResource MapForegroundThemeBrush}"/>
        <Setter Property="BorderBrush" Value="{ThemeResource MapBorderThemeBrush}"/>
        <Setter Property="BorderThickness" Value="{ThemeResource MapBorderThemeThickness}"/>        
        <Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1Maps:C1MapNavigator">
                    <Grid >
                        <Border x:Name="Pan" Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Style="{StaticResource MapPanBorderStyle}">
                            <Grid IsHitTestVisible="False">
                                <Path x:Name="north" Fill="{TemplateBinding Foreground}"  Data="M15,22.6 L20,17.7 L25,22.6 z" Style="{StaticResource MapPanToolArrowStyle}" Stretch="Fill" VerticalAlignment="Top" HorizontalAlignment="Center" />
                                <Path x:Name="east" Fill="{TemplateBinding Foreground}"  Data="M15,22.6 L20,17.7 L25,22.6 z" Style="{StaticResource MapPanToolArrowStyle}" Stretch="Fill" HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Center">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform Angle="90"/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                                <Path x:Name="south" Fill="{TemplateBinding Foreground}"  Data="M15,22.6 L20,17.7 L25,22.6 z" Style="{StaticResource MapPanToolArrowStyle}" Stretch="Fill" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Bottom" HorizontalAlignment="Center">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform Angle="180"/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                                <Path  x:Name="west" Fill="{TemplateBinding Foreground}"  Data="M15,22.6 L20,17.7 L25,22.6 z" Style="{StaticResource MapPanToolArrowStyle}" Stretch="Fill" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Left"  VerticalAlignment="Center">
                                    <Path.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform/>
                                            <SkewTransform/>
                                            <RotateTransform Angle="270"/>
                                            <TranslateTransform/>
                                        </TransformGroup>
                                    </Path.RenderTransform>
                                </Path>
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!-- C1VectorLayer -->
	<Style TargetType="c1Maps:C1VectorLayer">
        <Setter Property="Background" Value="Transparent" />
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="c1Maps:C1VectorLayer">
					<c1Maps:C1VectorPanel x:Name="Canvas"
                                          Background="{TemplateBinding Background}" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>