<Application x:Class="RelhaxModpack.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:local="clr-namespace:RelhaxModpack"
             xmlns:localUI="clr-namespace:RelhaxModpack.UI"
             xmlns:Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
             Exit="Application_Exit"
             Startup="Application_Startup" DispatcherUnhandledException="Application_DispatcherUnhandledException">
    <!-- https://stackoverflow.com/a/47901337/3128017 -->
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="UI/StyleDictionaries/RelhaxCommonStyleDictionary.xaml"/>
                <ResourceDictionary Source="UI/StyleDictionaries/RelhaxButtonStyleDictionary.xaml"/>
                <ResourceDictionary Source="UI/StyleDictionaries/RelhaxCheckboxStyleDictionary.xaml"/>
                <ResourceDictionary Source="UI/StyleDictionaries/RelhaxComboboxStyleDictionary.xaml"/>
                <ResourceDictionary Source="UI/StyleDictionaries/RelhaxRadioButtonStyleDictionary.xaml"/>
                <ResourceDictionary Source="UI/StyleDictionaries/RelhaxTabItemStyleDictionary.xaml"/>
                <ResourceDictionary Source="UI/StyleDictionaries/RelhaxSelectionListTabItemStyleDictionary.xaml"/>
                <ResourceDictionary Source="UI/StyleDictionaries/RelhaxListBoxStyleDictionary.xaml"/>
            </ResourceDictionary.MergedDictionaries>
            <!-- https://stackoverflow.com/a/32558808/3128017 of https://stackoverflow.com/questions/14033238/wpf-setting-tooltip-maxwidth -->
            <Style TargetType="ToolTip">
                <Style.Resources>
                    <Style TargetType="ContentPresenter">
                        <Style.Resources>
                            <Style TargetType="TextBlock">
                                <Setter Property="TextWrapping" Value="Wrap" />
                            </Style>
                        </Style.Resources>
                    </Style>
                </Style.Resources>
                <Setter Property="MaxWidth" Value="500" />
            </Style>
        </ResourceDictionary>
    </Application.Resources>
</Application>
