<!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. -->
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:ModernWpf.Controls"
    xmlns:primitives="clr-namespace:ModernWpf.Controls.Primitives"
    xmlns:sys="clr-namespace:System;assembly=mscorlib">

    <Thickness x:Key="ToolTipBorderPadding">9,6,9,8</Thickness>
    <sys:Double x:Key="ToolTipMaxWidth">320</sys:Double>

    <Style x:Key="DefaultToolTipStyle" TargetType="ToolTip">
        <Setter Property="OverridesDefaultStyle" Value="True" />
        <Setter Property="Foreground" Value="{DynamicResource ToolTipForegroundBrush}" />
        <Setter Property="Background" Value="{DynamicResource ToolTipBackgroundBrush}" />
        <Setter Property="BorderBrush" Value="{DynamicResource ToolTipBorderBrush}" />
        <Setter Property="BorderThickness" Value="{DynamicResource ToolTipBorderThemeThickness}" />
        <Setter Property="FontFamily" Value="{DynamicResource {x:Static SystemFonts.StatusFontFamilyKey}}" />
        <Setter Property="FontWeight" Value="Normal" />
        <Setter Property="FontSize" Value="{DynamicResource ToolTipContentThemeFontSize}" />
        <Setter Property="Padding" Value="{StaticResource ToolTipBorderPadding}" />
        <Setter Property="MaxWidth" Value="{StaticResource ToolTipMaxWidth}" />
        <Setter Property="primitives:ControlHelper.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
        <Setter Property="HasDropShadow" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" />
        <Setter Property="RenderOptions.ClearTypeHint" Value="Enabled" />
        <Setter Property="SnapsToDevicePixels" Value="true" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ToolTip">
                    <primitives:ThemeShadowChrome
                        Depth="16"
                        IsShadowEnabled="{TemplateBinding HasDropShadow}"
                        MaxWidth="{TemplateBinding MaxWidth}"
                        CornerRadius="{TemplateBinding primitives:ControlHelper.CornerRadius}"
                        SnapsToDevicePixels="True">
                        <Border
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            Padding="{TemplateBinding Padding}"
                            CornerRadius="{TemplateBinding primitives:ControlHelper.CornerRadius}">
                            <local:ContentPresenterEx
                                TextWrapping="Wrap"
                                SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
                        </Border>
                    </primitives:ThemeShadowChrome>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="ToolTip" BasedOn="{StaticResource DefaultToolTipStyle}" />

</ResourceDictionary>