<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
                    xmlns:ctrl="clr-namespace:FasdDesktopUi.Basics.UserControls"
                    >

    <SolidColorBrush x:Key="Transparent.Custom"
                     Color="#01010101" />

    <ctrl:StatusTreshholdTooltip x:Key="Tooltip.Treshold" />
    
    <Style x:Key="DetailsPage.DataHistory.ControlBar.Base">
        <Setter Property="Control.FontFamily"
                Value="Calibri" />
        <Setter Property="Control.FontWeight"
                Value="Regular" />
        <Setter Property="TextBlock.LineHeight"
                Value="13" />
        <Setter Property="TextBlock.LineStackingStrategy"
                Value="BlockLineHeight" />
    </Style>

    <Style x:Key="DetailsPage.DataHistory.ControlBar.Text"
           BasedOn="{StaticResource DetailsPage.DataHistory.ControlBar.Base}">
        <Setter Property="Control.Foreground"
                Value="{DynamicResource FontColor.DetailsPage.DataHistory.ControlBar.Text}" />
    </Style>

    <Style x:Key="DetailsPage.DataHistory.ControlBar.Action"
           BasedOn="{StaticResource DetailsPage.DataHistory.ControlBar.Base}">
        <Setter Property="Control.Foreground"
                Value="{DynamicResource FontColor.DetailsPage.DataHistory.ControlBar.Action}" />
        <Setter Property="Control.Cursor"
                Value="Hand" />
        <Style.Triggers>
            <Trigger Property="TextBlock.IsMouseOver"
                     Value="True">
                <Setter Property="TextBlock.TextDecorations"
                        Value="Underline" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="DetailsPage.DataHistory.ColumnHeader">
        <Setter Property="Control.VerticalAlignment"
                Value="Center" />
        <Setter Property="Control.HorizontalAlignment"
                Value="Center" />
        <Setter Property="Control.Padding"
                Value="10, 1.5" />
        <Setter Property="Control.FontFamily"
                Value="Calibri" />
        <Setter Property="Control.FontWeight"
                Value="Regular" />
        <Setter Property="Control.FontSize"
                Value="13" />
        <Setter Property="TextBlock.LineHeight"
                Value="15" />
        <Setter Property="TextBlock.LineStackingStrategy"
                Value="BlockLineHeight" />
        <Setter Property="Control.Foreground"
                Value="{DynamicResource FontColor.DetailsPage.DataHistory.Date}" />
        <Setter Property="Control.IsHitTestVisible"
                Value="False" />
    </Style>

    <Style x:Key="DetailsPage.DataHistory.TitleColumn.OverviewTitle">
        <Setter Property="Control.VerticalAlignment"
                Value="Center" />
        <Setter Property="ItemsControl.HorizontalAlignment"
                Value="Right" />
        <Setter Property="Control.FontFamily"
                Value="Calibri" />
        <Setter Property="Control.FontWeight"
                Value="Bold" />
        <Setter Property="Control.FontSize"
                Value="14" />
        <Setter Property="TextBlock.LineHeight"
                Value="17" />
        <Setter Property="TextBlock.LineStackingStrategy"
                Value="BlockLineHeight" />
        <Setter Property="TextBlock.TextAlignment"
                Value="Right" />
        <Setter Property="Control.Foreground"
                Value="{DynamicResource FontColor.DetailsPage.DataHistory.TitleColumn.OverviewTitle}" />
        <Setter Property="Control.IsHitTestVisible"
                Value="False" />
    </Style>

    <Style x:Key="DetailsPage.DataHistory.TitleColumn.Title">
        <Setter Property="Control.VerticalAlignment"
                Value="Center" />
        <Setter Property="Control.FontFamily"
                Value="Calibri" />
        <Setter Property="Control.FontWeight"
                Value="Regular" />
        <Setter Property="Control.FontSize"
                Value="14" />
        <Setter Property="TextBlock.LineHeight"
                Value="17" />
        <Setter Property="TextBlock.LineStackingStrategy"
                Value="BlockLineHeight" />
        <Setter Property="TextBlock.TextAlignment"
                Value="Right" />
        <Setter Property="Control.Cursor"
                Value="Hand" />
        <Style.Triggers>
            <Trigger Property="Control.IsMouseOver"
                     Value="True">
                <Setter Property="Control.Foreground"
                        Value="{DynamicResource Color.FunctionMarker}" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="DetailsPage.DataHistory.TitleColumn.MainTitle"
           BasedOn="{StaticResource DetailsPage.DataHistory.TitleColumn.Title}">
        <Setter Property="Control.Foreground"
                Value="{DynamicResource FontColor.DetailsPage.DataHistory.TitleColumn.MainTitle}" />
    </Style>

    <Style x:Key="DetailsPage.DataHistory.TitleColumn.SubTitle"
           BasedOn="{StaticResource DetailsPage.DataHistory.TitleColumn.Title}">
        <Setter Property="Control.Foreground"
                Value="{DynamicResource FontColor.DetailsPage.DataHistory.TitleColumn.SubTitle}" />
    </Style>

    <Style x:Key="DetailsPage.DataHistory.Icon.Lock"
           TargetType="ico:AdaptableIcon">
        <Setter Property="SelectedInternIcon"
                Value="lock_open" />

        <Setter Property="PrimaryIconColor"
                Value="{DynamicResource Color.SoftContrast}" />
        <Setter Property="BorderPadding"
                Value="5.5" />
        <Setter Property="IconHeight"
                Value="60" />
        <Setter Property="IconWidth"
                Value="20" />
        <Setter Property="Cursor"
                Value="Hand" />
        <Style.Triggers>

            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ElementName=DataHistory, Path=IsVerticalExpandLocked}"
                               Value="False" />
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}"
                               Value="False" />
                </MultiDataTrigger.Conditions>
                <Setter Property="SelectedInternIcon"
                        Value="lock_open" />
                <Setter Property="PrimaryIconColor"
                        Value="{DynamicResource Color.SoftContrast}" />
            </MultiDataTrigger>

            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ElementName=DataHistory, Path=IsVerticalExpandLocked}"
                               Value="False" />
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}"
                               Value="True" />
                </MultiDataTrigger.Conditions>

                <Setter Property="SelectedInternIcon"
                        Value="lock_openHover" />
                <Setter Property="PrimaryIconColor"
                        Value="{DynamicResource Color.Menu.Icon.Hover}" />
            </MultiDataTrigger>

            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ElementName=DataHistory, Path=IsVerticalExpandLocked}"
                               Value="True" />
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}"
                               Value="False" />
                </MultiDataTrigger.Conditions>

                <Setter Property="SelectedInternIcon"
                        Value="lock_closed" />
                <Setter Property="PrimaryIconColor"
                        Value="{DynamicResource Color.Menu.Icon}" />
            </MultiDataTrigger>

            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding ElementName=DataHistory, Path=IsVerticalExpandLocked}"
                               Value="True" />
                    <Condition Binding="{Binding RelativeSource={RelativeSource Self}, Path=IsMouseOver}"
                               Value="True" />
                </MultiDataTrigger.Conditions>

                <Setter Property="SelectedInternIcon"
                        Value="lock_closedHover" />
                <Setter Property="PrimaryIconColor"
                        Value="{DynamicResource Color.Menu.Icon.Hover}" />
                <Setter Property="BorderPadding"
                        Value="3" />
            </MultiDataTrigger>

        </Style.Triggers>
    </Style>

    <Style x:Key="DetailsPage.DataHistory.Icon.Chevron"
           TargetType="ico:AdaptableIcon">
        <Setter Property="Cursor"
                Value="Hand" />
        <Setter Property="PrimaryIconColor"
                Value="{DynamicResource Color.SoftContrast}" />
        <Setter Property="IconHeight"
                Value="60" />
        <Setter Property="IconWidth"
                Value="20" />
        <Setter Property="BorderPadding"
                Value="6.5" />

        <Style.Triggers>
            <Trigger Property="IsMouseOver"
                     Value="True">
                <Setter Property="PrimaryIconColor"
                        Value="{DynamicResource Color.FunctionMarker}" />
                <Setter Property="BorderPadding"
                        Value="6" />
            </Trigger>

            <DataTrigger Binding="{Binding ElementName=DataHistory, Path=IsHorizontalCollapsed}"
                         Value="True">
                <Setter Property="SelectedInternIcon"
                        Value="misc_chevron_right" />
            </DataTrigger>

            <DataTrigger Binding="{Binding ElementName=DataHistory, Path=IsHorizontalCollapsed}"
                         Value="False">
                <Setter Property="SelectedInternIcon"
                        Value="misc_chevron_left" />
            </DataTrigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="DetailsPage.DataHistory.Value">
        <Setter Property="Control.VerticalAlignment"
                Value="Center" />
        <Setter Property="Control.FontFamily"
                Value="Calibri" />
        <Setter Property="Control.FontWeight"
                Value="Bold" />
        <Setter Property="Control.Foreground"
                Value="White" />
        <Setter Property="Control.FontSize"
                Value="14" />
        <Setter Property="TextBlock.LineHeight"
                Value="17" />
        <Setter Property="TextBlock.LineStackingStrategy"
                Value="BlockLineHeight" />
        <Setter Property="TextBlock.TextAlignment"
                Value="Center" />
        <Setter Property="TextBlock.TextTrimming"
                Value="CharacterEllipsis" />
        <Style.Triggers>
            <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Border}, Path=Background}"
                         Value="{StaticResource Transparent.Custom}">

                <Setter Property="Control.FontWeight"
                        Value="Regular" />
                <Setter Property="TextBlock.Foreground"
                        Value="{DynamicResource FontColor.DetailsPage.DataHistory.Value}" />

            </DataTrigger>
        </Style.Triggers>

    </Style>

    <Style x:Key="DetailsPage.DataHistory.Value.Aggregate">
        <Setter Property="Control.VerticalAlignment"
                Value="Center" />
        <Setter Property="ItemsControl.Margin"
                Value="2,0,0,0" />
        <Setter Property="Control.FontFamily"
                Value="Calibri" />
        <Setter Property="Control.FontWeight"
                Value="Bold" />
        <Setter Property="Control.FontSize"
                Value="16" />
        <Setter Property="TextBlock.LineHeight"
                Value="17" />
        <Setter Property="TextBlock.LineStackingStrategy"
                Value="BlockLineHeight" />
        <Setter Property="TextBlock.TextAlignment"
                Value="Center" />
    </Style>

    <Style x:Key="DetailsPage.DataHistory.ValueBorder"
           TargetType="Border">
        <Setter Property="Background"
                Value="{DynamicResource Transparent.Custom}" />
        <Setter Property="CornerRadius"
                Value="5" />
        <Setter Property="Height"
                Value="24" />
        <Setter Property="Margin"
                Value="-5, 0, 0, 0" />
        <Setter Property="Padding"
                Value="5, 1.5, 5, 1.5" />
        <Style.Resources>
            <Style TargetType="TextBlock"
                   BasedOn="{StaticResource DetailsPage.DataHistory.Value}" />
        </Style.Resources>
    </Style>
    
    <Style x:Key="DetailsPage.DataHistory.ValueBorder.Blue"
           BasedOn="{StaticResource DetailsPage.DataHistory.ValueBorder}"
           TargetType="Border">
        <Setter Property="Background"
                Value="{DynamicResource HighlightColor.Blue}" />
    </Style>

    <Style x:Key="DetailsPage.DataHistory.ValueBorder.Green"
           BasedOn="{StaticResource DetailsPage.DataHistory.ValueBorder}"
           TargetType="Border">
        <Setter Property="Background"
                Value="{DynamicResource HighlightColor.Green}" />
    </Style>

    <Style x:Key="DetailsPage.DataHistory.ValueBorder.Orange"
           BasedOn="{StaticResource DetailsPage.DataHistory.ValueBorder}"
           TargetType="Border">
        <Setter Property="Background"
                Value="{DynamicResource HighlightColor.Orange}" />
    </Style>

    <Style x:Key="DetailsPage.DataHistory.ValueBorder.Red"
           BasedOn="{StaticResource DetailsPage.DataHistory.ValueBorder}"
           TargetType="Border">
        <Setter Property="Background"
                Value="{DynamicResource HighlightColor.Red}" />
    </Style>

</ResourceDictionary>