	  
	   
    
		


<!--// Copyright © ComponentOne LLC.
// This file is part of ComponentOne Studio WPF 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="clr-namespace:C1.WPF;assembly=C1.WPF.4" xmlns:c1Maps="clr-namespace:C1.WPF.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="/C1.WPF.4;component/themes/Common.xaml" />
        <ResourceDictionary Source="/C1.WPF.Maps.4;component/themes/ZoomScrollBar.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!-- Brush @ C1Map Pressed State -->
    <SolidColorBrush x:Key="MapPressedBrush" Color="{StaticResource SelectedColor}" />
        
    <!-- Brush @ C1Map PanTool Background -->
    <LinearGradientBrush x:Key="MapPanToolBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FFFAFBFC" />
        <GradientStop Color="#FFE9EDF2" Offset="0.35" />
        <GradientStop Color="{StaticResource BaseColor}" Offset="1" />
    </LinearGradientBrush>

    <!-- Brush @ C1Map Foreground -->
    <SolidColorBrush x:Key="MapForegroundBrush" Color="#FF31424E" />
    <SolidColorBrush x:Key="WpfInputMapForegroundBrush" Color="#FF333333" />

    <!-- Thickness & Brush @ C1Map Border -->
    <Thickness x:Key="MapBorderThickness">1</Thickness>
    <SolidColorBrush x:Key="MapBorderBrush" Color="{StaticResource BorderColor}" />

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

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

    <!-- Style @ C1Map Pan Pressed -->
    <Style x:Key="MapPanPressedStyle" TargetType="Ellipse">
        <Setter Property="Height" Value="12" />
        <Setter Property="Width" Value="12" />
        <Setter Property="OpacityMask">
            <Setter.Value>
                <RadialGradientBrush>
                    <GradientStop Color="White" Offset="0" />
                    <GradientStop Color="#00FFFFFF" Offset="1" />
                </RadialGradientBrush>
            </Setter.Value>
        </Setter>
    </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">
            <Setter.Value>
                
                
                <LinearGradientBrush EndPoint="0,0" StartPoint="1,1">
                    <GradientStop Color="#FFF7F7F7" Offset="0" />
                    <GradientStop Color="#FFEDEDED" Offset="0.37" />
                    <GradientStop Color="#FFE6E6E6" Offset="0.37" />
                    <GradientStop Color="#FFB7B7B7" Offset="1" />
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="CornerRadius" Value="1" />
        
        
                <Setter Property="BorderBrush" Value="#FF727272" />
        <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">
        
        
        <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 WpfInputMapForegroundBrush}" />
        <Setter Property="BorderThickness" Value="{StaticResource MapBorderThickness}" />
        <Setter Property="FontSize" Value="9" />
        <Setter Property="Padding" Value="10" />
        <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" />
                            <c1Maps:C1MapToolsLayer x:Name="Tools" Foreground="{TemplateBinding Foreground}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding PressedBrush}" />
                            <Border x:Name="DisabledVisualElement" Background="{StaticResource 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" />
                </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:C1MapToolsLayer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="c1Maps:C1MapToolsLayer">
                    <Grid>
                        <c1:C1BrushBuilder x:Name="PanBackground" Input="{TemplateBinding Background}" DesignBrush="{StaticResource MapPanToolBackgroundBrush}" DesignColor="{StaticResource BaseColor}" />
                        <c1:C1BrushBuilder x:Name="PanMakerBackground" Input="{TemplateBinding Foreground}" DesignBrush="{StaticResource MapPanToolBackgroundBrush}" DesignColor="{StaticResource BaseColor}" />
                        <Grid Margin="{TemplateBinding Padding}" HorizontalAlignment="Left">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" MaxHeight="170" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <!-- Pan tool -->
                            <Border x:Name="Pan" Background="{Binding Output, ElementName=PanBackground}" 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>
                                    <Ellipse x:Name="PanMarker" Fill="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}" Style="{StaticResource MapPanPressedStyle}" Visibility="Collapsed" />
                                </Grid>
                            </Border>
                            <!-- Zoom tool -->
                            <Grid Grid.Row="1" Width="50" Margin="0,10,0,0">
                                <ScrollBar x:Name="Zoom" SmallChange="1" LargeChange="1" Orientation="Vertical" Style="{StaticResource ZoomScrollBar}" RenderTransformOrigin="0.5,0.5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" Foreground="{TemplateBinding Foreground}" BorderThickness="{TemplateBinding BorderThickness}" c1:ClearStyleExtensions.MouseOverBrush="{TemplateBinding c1:ClearStyleExtensions.MouseOverBrush}" c1:ClearStyleExtensions.PressedBrush="{TemplateBinding c1:ClearStyleExtensions.PressedBrush}">
                                    <ScrollBar.RenderTransform>
                                        <RotateTransform Angle="180" />
                                    </ScrollBar.RenderTransform>
                                </ScrollBar>
                            </Grid>
                        </Grid>

                        <!-- Scales -->
                        <Border x:Name="ScalesBackground" Grid.Row="2" Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" HorizontalAlignment="Right" VerticalAlignment="Bottom">
                            <Grid Width="215" Margin="3">
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" MinWidth="55" />
                                    <ColumnDefinition />
                                </Grid.ColumnDefinitions>
                                <Border x:Name="MetersScale" Grid.Column="1" Style="{StaticResource MapScaleItemStyle}" IsHitTestVisible="true" Margin="0,0,0,4" VerticalAlignment="Bottom" />
                                <Border x:Name="MilesScale" Grid.Column="1" Grid.Row="1" Style="{StaticResource MapScaleItemStyle}" IsHitTestVisible="true" />
                                <TextBlock x:Name="MetersLabel" Foreground="{TemplateBinding Foreground}" Text="" Style="{StaticResource MapScaleLabelStyle}" />
                                <TextBlock x:Name="MilesLabel" Grid.Row="1" Foreground="{TemplateBinding Foreground}" Text="" Style="{StaticResource MapScaleLabelStyle}" />
                            </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">
                    <Grid Background="{TemplateBinding Background}">
                        <c1Maps:C1VectorPanel x:Name="Canvas" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
