﻿<Application x:Class="OpenTapEditor.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:OpenTapEditor"
             xmlns:ui="clr-namespace:UILib;assembly=UILib"
             xmlns:op="clr-namespace:OpenTap;assembly=OpenTap"
             xmlns:sys="clr-namespace:System;assembly=mscorlib" 
             Startup="Application_Startup">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/UILib;component/Styles.xaml"/>
                <ResourceDictionary Source="/SeqEditor;component/UIStyle.xaml"/>
            </ResourceDictionary.MergedDictionaries>

            <FontFamily x:Key="iconfont">
                /SeqEditor;component/#iconfont
            </FontFamily>

            <sys:Double x:Key="GlobalFontSize">14</sys:Double>
            <ui:ReverseBoolConverter x:Key="ReverseBool"/>
            <ObjectDataProvider x:Key="BreakConditionValues" 
        MethodName="GetValues" 
        ObjectType="{x:Type sys:Enum}">
                <ObjectDataProvider.MethodParameters>
                    <x:Type TypeName="op:BreakCondition"/>
                </ObjectDataProvider.MethodParameters>
            </ObjectDataProvider>

            <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarWidthKey}">3</sys:Double>
            <sys:Double x:Key="{x:Static SystemParameters.HorizontalScrollBarHeightKey}">3</sys:Double>

            <Style TargetType="ScrollViewer">
                <Style.Resources>
                    <Style TargetType="ScrollBar" BasedOn="{StaticResource ScrollStyle_Mobile}"/>
                </Style.Resources>
            </Style>

            <Style TargetType="TabItem">
                <Setter Property="Padding" Value="5"/>
                <Setter Property="Background" Value="#f2f3f5"/>
                <Setter Property="BorderThickness" Value="0"/>
                <Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
                <Setter Property="FontSize" Value="10"/>
                <Setter Property="Cursor" Value="Hand"/>
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="TabItem">
                            <Border x:Name="border" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
                                <ContentPresenter x:Name="contentPresenter" 
              ContentSource="Header"
              HorizontalAlignment="Center" 
              VerticalAlignment="Center"/>
                            </Border>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter TargetName="border" Property="Background" Value="#e0e9f2"/>
                                </Trigger>
                                <Trigger Property="IsSelected" Value="True">
                                    <Setter TargetName="border" Property="Background" Value="#bcddee"/>
                                    <Setter TargetName="border" Property="BorderThickness" Value="0,0,0,2"/>
                                    <Setter TargetName="border" Property="BorderBrush" Value="#3498DB"/>
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </ResourceDictionary>
    </Application.Resources>
</Application>
